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 need to do up a report based on my data below.
Hope can get some help as i am still very new to power bi.
Appreciate all the help i can get.
Thanks!
Solved! Go to Solution.
Hi @Jiahui2805
You can create several measures as follow.
Apr =
VAR _a = CALCULATE(SUM(DATA[Value]), FILTER(ALLEXCEPT(DATA, DATA[Shape]), EXACT(DATA[Months], "Apr") && EXACT(DATA[Categoy], "Applicable for Discount")))
VAR _d = CALCULATE(SUM(DATA[Value]), FILTER(ALLEXCEPT(DATA, DATA[Shape]), EXACT(DATA[Months], "Apr") && EXACT(DATA[Categoy], "Discount")))
RETURN
DIVIDE(_d, _a)
May =
VAR _a = CALCULATE(SUM(DATA[Value]), FILTER(ALLEXCEPT(DATA, DATA[Shape]), EXACT(DATA[Months], "May") && EXACT(DATA[Categoy], "Applicable for Discount")))
VAR _d = CALCULATE(SUM(DATA[Value]), FILTER(ALLEXCEPT(DATA, DATA[Shape]), EXACT(DATA[Months], "May") && EXACT(DATA[Categoy], "Discount")))
RETURN
DIVIDE(_d, _a)
Is this the result you expect?
Best Regards,
Community Support Team _Yuliax
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Jiahui2805
You can create several measures as follow.
Apr =
VAR _a = CALCULATE(SUM(DATA[Value]), FILTER(ALLEXCEPT(DATA, DATA[Shape]), EXACT(DATA[Months], "Apr") && EXACT(DATA[Categoy], "Applicable for Discount")))
VAR _d = CALCULATE(SUM(DATA[Value]), FILTER(ALLEXCEPT(DATA, DATA[Shape]), EXACT(DATA[Months], "Apr") && EXACT(DATA[Categoy], "Discount")))
RETURN
DIVIDE(_d, _a)
May =
VAR _a = CALCULATE(SUM(DATA[Value]), FILTER(ALLEXCEPT(DATA, DATA[Shape]), EXACT(DATA[Months], "May") && EXACT(DATA[Categoy], "Applicable for Discount")))
VAR _d = CALCULATE(SUM(DATA[Value]), FILTER(ALLEXCEPT(DATA, DATA[Shape]), EXACT(DATA[Months], "May") && EXACT(DATA[Categoy], "Discount")))
RETURN
DIVIDE(_d, _a)
Is this the result you expect?
Best Regards,
Community Support Team _Yuliax
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Jiahui2805
I have created a random data set in excel which looks like this
and by creating these measure you can get what you what.
Hope this solves your problem if not please share more details
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |