Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I want to filter a line visual with a slicer. This slicer filters the year from a seperate date table. This date table is connected to the data table.
I want to plot 3 lines. The green and black are showing the actual and last year values. Those are correct.
The red should show the minimum of the last 4 years. I cant get this done. It is somehow not taking the correct dates.
measure = CALCULATE(MIN(data[Value]);DATESINPERIOD('Calendar'[Date];LASTDATE('Calendar'[Date]);-4;YEAR))
Solved! Go to Solution.
Got it running with following measure:
@Anonymous from what i can see it is plotting the dates, the issue is with your avg?
what are you expecting to see, i can't quite understand what the issue is, how is it not showing what you expect?
Proud to be a Super User!
Thank you for you answer.
I want the minimum of the last 4 years plotted for each day. Right now the red line is flat and it seems, that the calculation is wrong, because the second part of the calculate function doesnt work the way I want to.
I checked it by counting the values in a table. Per day there are around 96 values, My measure should include the last 4 years so I expect 384 values.
@Anonymous its quite difficult to see the problem without looking at the data, are you able to share data?
also when you say you expect to see 384 (on the count), would that be plotted 384 a flat line? it would be best to explain what you are trying to achieve, not technically but from a business perspective.
Proud to be a Super User!
Left you can see the table and right the slicer.
the first two columns are exactly doing, what I expect. The last column (last4years) is showing a wrong result.
ok so just to be clear @Anonymous
measure = CALCULATE(MIN(data[Value]);DATESINPERIOD('Calendar'[Date];LASTDATE('Calendar'[Date]);-4;YEAR))
is the column last4years?
Proud to be a Super User!
Yes.
Got it running with following measure:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
105 | |
79 | |
69 | |
62 |
User | Count |
---|---|
142 | |
105 | |
103 | |
85 | |
70 |