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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Grouping Help

Hello,

I have a below table..
userid               stock value
12345               150000
23456                190039
45678                100000
78654                 128888
 Basically I need to group stock value in respect to userid (userid should be fixed) as
1) if stock value is >=150000 then "HIGH" 
2)if stock value is <150000 & >=100000 then "MEDIUM", else "LOW"
(
IF {fixed [userid]:max([stock value])} > 15000 THEN "High" ELSEIF {fixed [userid]:max([stock value])}<= 15000 AND {fixed [userid]:max([stock value])} >= 10000 THEN "Medium" ELSEIF {fixed [userid]:max([stock value])}< 10000 AND{fixed [userid]:max([stock value])} >= 1000 THEN "Low" ELSE "Very Low" END )-----> This is the tableau formula that I need to implement in powerBi

I have used below formula but it's not working

Column = IF(CALCULATE(COUNT(Sheet1[userid]),Sheet1[stock value]>=15000),"High",(IF(CALCULATE(COUNT(Sheet1[userid]),Sheet1[stock value]<15000 && CALCULATE(COUNT(Sheet1[userid]),Sheet1[stock value]>=10000),"Medium"),"Low")
 
showing below error -
alpha_123_0-1629740845292.png

Can someone suggest me ?



3 REPLIES 3
jdbuchanan71
Super User
Super User

When you say 'fixed' what do you mean?  It is a set string like '654321987'?

jdbuchanan71
Super User
Super User

Not sure what your count is doing but if you want is as a calculated column in your table based just on the [stock value] it would be like this.

Column =
IF (
    Sheet1[stock value] >= 15000,
    "High",
    IF ( Sheet1[stock value] >= 10000, "Medium", "Low" )
)
Anonymous
Not applicable

@jdbuchanan71 i need to keep userif fixed.
basically i need to convert below tableau formula into powerbi dax measure-

IF {fixed [userid]:max([stock value])} > 15000 THEN "High" ELSEIF {fixed [userid]:max([stock value])}<= 15000 AND {fixed [userid]:max([stock value])} >= 10000 THEN "Medium" ELSEIF {fixed [userid]:max([stock value])}< 10000 AND{fixed [userid]:max([stock value])} >= 1000 THEN "Low" ELSE "Very Low" END 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors