Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Subha
Frequent Visitor

MEASURES

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
CUSTOMERPO#VALUECATEGORY
A1 $    20.00P3
A2 $    40.00P3
A7 $  100.00P1
A10 $    50.00P2
B4 $  100.00P1
B3 $    50.00P2
B8 $    50.00P2
D5 $  200.00P1
D9 $  200.00P1
D6 $  100.00P1

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 
CUSTOMERP1(cellD17)P2(CellE17)P3(Cell F17)CLASSIFICATION
A25%25%50%T2
B33%67% T2
D100%  T1

 

Any assistance would be greatly appreciated.

Thank you

 

1 ACCEPTED 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"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
ryan_mayu
Super User
Super User

@Subha 

What's the logic of that formula?





Did I answer your question? Mark my post as a solution!

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

 

Subha
Frequent Visitor

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"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
amitchandak
Super User
Super User

@Subha , what are D18 and E18 here?

 

IF(D18>=50%,"T1",IF(D18+E18>=50%,"T2","T3"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.