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

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.

Reply
Anonymous
Not applicable

Analyzing Complex DAX to get values for each row?

Hey All,

 

Trying to understand where this code is going wrong. I am getting results for INT11 but not INT1-10. Result below. I understand I casted a function that puts in counts greater or equal to 11 to INT 11. But now im not seeing counts from 1-10.

 

Here all im trying to do it count of a count. For e.g.

ABC0
ABC1
ABC1

 

Then Result table (so basically if theres 2 instances of 1 count, then i want INT2 to show INT2, if ABC had 3 line items of 1, that would be associated to INT3.

INT 10
INT 2

2

Count of INT Final - DL = 
var _int = SELECTEDVALUE(INT_SORT[INTRANK])
var tab = 
SUMMARIZE(
DISTINCT(PROD[DEVICE_LOCATION]),
PROD[DEVICE_LOCATION],
"Count",
COUNTX(
FILTER('PROD'
, 'PROD'[IMPBY_DEVICELOCATION] <> 0), 1
))
var newtab = 
ADDCOLUMNS(
tab,
"Result",
"INT" & 
IF( COUNTX(
FILTER('PROD'
, 'PROD'[IMPBY_DEVICELOCATION] <> 0), 1
) >= 11, 11, 
COUNTX(
FILTER('PROD'
, 'PROD'[IMPBY_DEVICELOCATION] <> 0), 1
))
)
return
COUNTROWS(
FILTER(
newtab,
[Result]=_int
)
)

 

 

 

Result im getting for this dAX

2020-08-14_11-28-15.png

 

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi , @Anonymous 

The information you have provided is not making the problem clear to me. Can you please explain more details about this dax.

You also  can upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Best Regards,
Community Support Team _ Eason

Anonymous
Not applicable

Hi @Anonymous 

 

If everything is getting 0 and only INT11 is getting a number.

How is Total 1,180,464?

 

Is there some condition changing the value to 0?

 

Did I resolve your issue? Mark my post as a solution!

 

Appreciate your Kudos, Press the thumbs up button!!

 

Regards,
Pranit

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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