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.
Hello Guys,
I need some help with following (i can't figure out by myself). I import some data from a SQL server, put this in a matrix where per month the maximum value is shown by month. I want to show the difference for the last month by the previous month, so only one additonal column in the matrix on the end of it.
DataFile: https://www.dropbox.com/s/ylxnnrpxt2vq4xu/data.csv?dl=0
BI File: https://www.dropbox.com/s/twikjwox0yq6bok/PBI%20Test.pbix?dl=0
Solved! Go to Solution.
Hi @Martin74 ,
Please check the measure.
Measure = CALCULATE(MAX(data[ActualValue]),FILTER(ALL(data),data[UTCDateTime].[Year]=SELECTEDVALUE(data[UTCDateTime].[Year])&&data[UTCDateTime].[MonthNo]=SELECTEDVALUE(data[UTCDateTime].[MonthNo])-1&&data[PointName]=SELECTEDVALUE(data[PointName])))-MAX(data[ActualValue])
Result would be shown as below.
Best Regards,
Jay
Hi @Martin74 ,
Please check the measure.
Measure = CALCULATE(MAX(data[ActualValue]),FILTER(ALL(data),data[UTCDateTime].[Year]=SELECTEDVALUE(data[UTCDateTime].[Year])&&data[UTCDateTime].[MonthNo]=SELECTEDVALUE(data[UTCDateTime].[MonthNo])-1&&data[PointName]=SELECTEDVALUE(data[PointName])))-MAX(data[ActualValue])
Result would be shown as below.
Best Regards,
Jay
Thanks Jay, this helps me a lot. I figured out by doing it another (messy) way. This much more cleaner DAX. I appriciate your help.
Read my articles here.
https://exceleratorbi.com.au/dax-time-intelligence-beginners/
and here
https://exceleratorbi.com.au/building-a-matrix-with-asymmetrical-columns-and-rows-in-power-bi/
first you need to write your 2 measures (first article), then you need to create the table you need (second article)
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 |
---|---|
117 | |
104 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |