Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
I am new to PBI and seeking assistance. I have a huge dataset but created below a table to mimic what I am looking for.
| DATA TABLE | |||
| CUSTOMER | PO# | VALUE | CATEGORY |
| A | 1 | $ 20.00 | P3 |
| A | 2 | $ 40.00 | P3 |
| A | 7 | $ 100.00 | P1 |
| A | 10 | $ 50.00 | P2 |
| B | 4 | $ 100.00 | P1 |
| B | 3 | $ 50.00 | P2 |
| B | 8 | $ 50.00 | P2 |
| D | 5 | $ 200.00 | P1 |
| D | 9 | $ 200.00 | P1 |
| D | 6 | $ 100.00 | P1 |
Category is a calculated column. I created the below measures to create the second matrix below.
| M1= COUNT('DATA'[PO#]) |
| M2 = CALCULATE([M1],ALL('DATA'[CATEGORY]) |
| M3 =DIVIDE([M1],[M2],0) |
I am struggling to write a measure to get me the results highlighted in red below. If excel I would have used the formula IF(D18>=50%,"T1",IF(D18+E18>=50%,"T2","T3"))
| MATRIX VISUAL | ||||
| CUSTOMER | P1(cellD17) | P2(CellE17) | P3(Cell F17) | CLASSIFICATION |
| A | 25% | 25% | 50% | T2 |
| B | 33% | 67% | T2 | |
| D | 100% | T1 |
Any assistance would be greatly appreciated.
Thank you
Solved! Go to Solution.
@Subha , Based on what I got, a New measure like
measure =
var _m1 = calculate([M3], filter(all(Table[CATEGORY]), Table[CATEGORY] ="M1"))
var _m2 = calculate([M3], filter(all(Table[CATEGORY]), Table[CATEGORY] ="M2"))
var _m3 = calculate([M3], filter(all(Table[CATEGORY]), Table[CATEGORY] ="M3"))
return
IF(_m1>= .5,"T1",
IF(_m2+_m3>=.5,"T2","T3"))
What's the logic of that formula?
Proud to be a Super User!
If the % of orders under category P1 is greater than 50% then classify as T1 if not add the percent of P1 and P2 and if that is greater than 50% classify as T2 else t3. So the broad idea is to classify the orders by the $ value and then see what is teh % of orders by customer that fall under that range and then classify
Amit - Refers to the specific excel cell
@Subha , Based on what I got, a New measure like
measure =
var _m1 = calculate([M3], filter(all(Table[CATEGORY]), Table[CATEGORY] ="M1"))
var _m2 = calculate([M3], filter(all(Table[CATEGORY]), Table[CATEGORY] ="M2"))
var _m3 = calculate([M3], filter(all(Table[CATEGORY]), Table[CATEGORY] ="M3"))
return
IF(_m1>= .5,"T1",
IF(_m2+_m3>=.5,"T2","T3"))
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 25 | |
| 23 | |
| 22 | |
| 17 | |
| 14 |
| User | Count |
|---|---|
| 25 | |
| 24 | |
| 20 | |
| 20 | |
| 19 |