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.
Hi
I am looking month with last year same month comparison in the below format:
I am having data as pe rthe below structure:
Solved! Go to Solution.
Hi @bicoffee ,
Unfortunately, your expected result cannot be achieved in Power BI, but I have tried my best to get close to your expectation. You can check the details through the attachment.
Measure = VAR _max=CALCULATE(SUM('Table'[SALES]),FILTER('Table',[Year]=MAX('Table'[Year])))
var _min=CALCULATE(SUM('Table'[SALES]),FILTER('Table',[Year]=MIN('Table'[Year])))
RETUrn IF(HASONEVALUE('Table'[Year]),SUM('Table'[SALES]),DIVIDE(_max-_min,_max))
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @bicoffee ,
Unfortunately, your expected result cannot be achieved in Power BI, but I have tried my best to get close to your expectation. You can check the details through the attachment.
Measure = VAR _max=CALCULATE(SUM('Table'[SALES]),FILTER('Table',[Year]=MAX('Table'[Year])))
var _min=CALCULATE(SUM('Table'[SALES]),FILTER('Table',[Year]=MIN('Table'[Year])))
RETUrn IF(HASONEVALUE('Table'[Year]),SUM('Table'[SALES]),DIVIDE(_max-_min,_max))
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.