Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, i am sourcing data from a file which contains values in rows. for example
Info 1 Q1 2021 -5
Info 2 Q1 2021 -4
Info 1 Q2 2022 10
Info 2 Q2 2023 15
I used power bi matrix to create a view where the amounts are showed based on the slicer.
My intent is to display the difference between my 2 columns Q1 2021 and Q2 2022 within the Matrix knowingly that the columns Q1 2021 and Q2 2022 may change as they are selected based on the slicer. any help?
thanks
Solved! Go to Solution.
Hi @powerbimatrix ,
Based on your description, I have created a simple sample:
Please try:
Measure = IF(ISINSCOPE('Table'[Year]),SUM('Table'[Value]),CALCULATE(SUM('Table'[Value]),FILTER('Table',[Year]=2022&&[Quarter]="Q2"))-CALCULATE(SUM('Table'[Value]),FILTER('Table',[Year]=2021&&[Quarter]="Q1")))
Rename column subtotal:
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @powerbimatrix ,
Based on your description, I have created a simple sample:
Please try:
Measure = IF(ISINSCOPE('Table'[Year]),SUM('Table'[Value]),CALCULATE(SUM('Table'[Value]),FILTER('Table',[Year]=2022&&[Quarter]="Q2"))-CALCULATE(SUM('Table'[Value]),FILTER('Table',[Year]=2021&&[Quarter]="Q1")))
Rename column subtotal:
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 61 | |
| 43 | |
| 40 | |
| 38 | |
| 22 |
| User | Count |
|---|---|
| 178 | |
| 125 | |
| 116 | |
| 77 | |
| 54 |