March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |