Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
87 | |
81 | |
53 | |
38 | |
35 |