The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am working on creating a matrix that is visual left to right vs top to bottom. I am having trouble caluclating the varaince between the rows in the matrix. My solution worked fine in the table visual but not in the matrix. Any help would be greatly appreciated.
My ideal would be replacing the total row in the matrix with a variance that subtracts 2021 info by month from 2020. I know how to remove the total row but not replace with a variance.
Thank you.
Table data displayed correctly.
Matrix currently displayed
Solved! Go to Solution.
Hi, @Anonymous ;
You could create a measure like below:
Measure = IF(ISINSCOPE('Table'[Year]),SUM([Value]),CALCULATE(SUM([Value]),FILTER('Table',[Year]=2021))-CALCULATE(SUM([Value]),FILTER('Table',[Year]=2020)))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ;
You could create a measure like below:
Measure = IF(ISINSCOPE('Table'[Year]),SUM([Value]),CALCULATE(SUM([Value]),FILTER('Table',[Year]=2021))-CALCULATE(SUM([Value]),FILTER('Table',[Year]=2020)))
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
you have to write 3 measures (amount for 2020, for 2021 and the difference) and place them all into the values-section of the matrix visual.
Then drag the month into the rows-section.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
User | Count |
---|---|
77 | |
75 | |
36 | |
31 | |
29 |
User | Count |
---|---|
94 | |
80 | |
55 | |
48 | |
48 |