I have 3 tables.
Table0 contains the column DateTime0
Table1 contains the columns DateTime1 and Price1.
Table2 contains the columns DateTime2, Price2, and Unit2.
I've linked DateTime0 with DateTime1, and DateTime0 with DateTime2.
I can put in a line plot of Price1 and Price2 as y-axis and DateTime0 as x-axis.
I can put in a slicer of DateTime0, and this then affects my line plot as expected.
I now want to put in a slicer of Unit2, such that Price2 displayed on my line plot would only come from those selected. But If I do this then my Price1 line dissapears, because it is also filtered.
How do I make it so that the slicer only affects the data coming from Table2?
I know I can do this with 2 seperate plots, but I want to be able to do it with one plot.
It looks like the cross filter direction of the relationship between DateTime0 and DateTime2 has the default value of Both, while what you want is to be Single. Double click the relation (it makes sense to change both relations) and change the value in Cross filter direction combo box to Single:
Related
I Have 3 tables,
1st table Measures : Contains all measures calculated using other tables and measures column names are ProgressPercentage, ProgressA and ProgressB.
2nd table Modules : This table contain distinct modules uses one of the slicer.
3rd table Iterations : This tables contains column Iteration in dates format which uses X-Axis in line graph and another column name is Area which uses for other slicer.
Using ProgressA and ProgressB I calculated ProgressPercentage.
In line graph x-axis is Iteration (Dates), Line represented in % uses measure column ProgressPercentage. In tooltip their are two values ProgressA and ProgressB.
Now issue is when I select Area from slicer then line graph is updated but not tooltip values. How I can update tooltip values using different table?
I have a table visual with a date column and I have a requirement to highlight the top 2 rows. The data on the table visual is sorted desc by the date column.
I need help to conditional format the background color for the top 2 rows.
I tried searching for a way to do this but no luck.
You can calculate the rank of the rows and use conditional formatting to highlight the top 2 rows. But first, we need to define what "top 2 rows" means. You said it is sorted by date descending, so I will assume that "top 2 rows" means the rows with the 2 biggest dates. I will use a measure, which will respond to filters applied on the data. Then we will highlight the rows with rank 1 and 2 (assuming dates are unique in table's rows).
Make new measure like this:
Measure = RANKX(ALLSELECTED('Table'); CALCULATE(SELECTEDVALUE('Table'[Date])))
Where Table is your table name, and Date is the name of the date column. This will give you a number (1, 2, 3...) where 1 is the row with the biggest date, 2 is the second biggest date, and so on.
Then for every field shown in your table, add the following background color condition (right click each item in the list of fields and select Conditional formatting -> Background color):
Set Format by to be Rules, select your measure in Based on field and ad condition > 0 and <= 2 to set the desired background color. Repeat this for all fields shown.
I am infant to power bi , And Below is the data which resembles to my
data set in Power BI
And below is result for the above data table
But my client wan'ts the dot lines in it and he is expecting the
report result to be as below
Can any one please help me how can I make it
First unpivot the Quarter columns:
-Click 'Edit Queries' at the top
-Select "Transform' tab
-Select the 4 quarter columns (Select 1st column, shift click last column to selct them
-Select 'Unpivot Columns'
-Back to home tab, close and apply
Now add a line chart visual. Place the new column (Which depicts the quarter) in the 'Axis' field. Place the values for the companies in the Values field.
I would like to create a table to compare Month To Date (MTD) Vs YTD Sales data metrics
I am using two queries:
1st query = YTD Sales data (Two fields: Sales and Quotes)
2nd query = MTD Sales Data (Two Fields: Sales and Quotes).
Each query has the same field names, just different data
I would like to output a table like the following
How to I create the above table? At the moment I can only create a table like the following:
The latter 1x4 table only works if I appropriately name the fields. But definitely isn’t what I want, because with enough fields, the table could go on forever.
Any help would be appreciated
In the query editor, create a label column for each table that labels what they are and then append the two tables together so you get something like this:
Then you can create a matrix visual with the Label column in the Columns field and the Sales and Quantity columns in the Values area.
Make sure you've switched "Show on Rows" to "On" under the Format > Values section of the Visualizations pane.
I have a Maxtrix that looks as follows:
And the Visualizations pane looks as follows:
Sales, COGS, GP and GP% are fields in a dataset. The YearMonth field is a field from another dataset.
What I want is for Sales, COGS, GP and GP% to be rows and my only column should be year-month. So I would have a row for Sales and totals for each year and month. And then another row for COGS and totals for each year and month etc. I can't find an easy way to do this because Sales, COGS, GP etc. are not like categories contained in another dataset, linked to this dataset that I could drag to Rows in the Visualization tab.
There is a setting for this. Go to the Format tab and turn on 'Show on rows' under the Values section.
I would first create a table using Enter Data e.g. All Measures containing 1 column (e.g. Measure Name) and 4 rows, containing Sales , COGS , GP, GP%.
Then I would create a Measure using the SWITCH function, e.g.
Any Measure = SWITCH ( 'All Measures'[Measure Name] , "Sales" , [Sales] ,"COGS", [COGS] , "GP" , [GP] , "GP%" , [GP%] )
Then I would add 'All Measures'[Measure Name] to the Rows well, and replace the Values well with Any Measure.
You may need to enhance that to get the numeric formats right, e.g. by wrapping each measure reference in a FORMAT function.