Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi there!
I am struggling with my DAX syntax and was hoping that someone could help me.
I have a measure which counts rows but includes a filter option
Solved! Go to Solution.
Hi @SteveODea
What @Greg_Deckler said or adjust your syntax to.
%cOUNT =
DIVIDE(
CALCULATE(
DISTINCTCOUNT( 'Table1'[Ref] ),
LEFT( 'Table1'[Desc], 3 ) <> "Acc"
),
CALCULATE(
DISTINCTCOUNT( 'Table1'[Ref] ),
ALL( 'Table1' ),
LEFT('Table1'[Desc],3) <> "Acc"
)
)
Hi @SteveODea
What @Greg_Deckler said or adjust your syntax to.
%cOUNT =
DIVIDE(
CALCULATE(
DISTINCTCOUNT( 'Table1'[Ref] ),
LEFT( 'Table1'[Desc], 3 ) <> "Acc"
),
CALCULATE(
DISTINCTCOUNT( 'Table1'[Ref] ),
ALL( 'Table1' ),
LEFT('Table1'[Desc],3) <> "Acc"
)
)
Thanks @Mariusz you're a legend!
I wasn't sure where to put the ALL function, and even now I know where it should go I don't really understand it, but it works!
I guess that's a battle for another day.
I also changed ALL to ALLSELECTED as I have some filters on the page but it's what I want and I have full control over the formatting too!
Cheers buddy!
Try click the drop down arrow for the field in the Values area and choose Show As | Percent of Grand Total or Percent of Row/Column Total.
Great thanks @Greg_Deckler that's a useful tip to know, which works.
The only problem I have now is I cannot format the %age as shown. All the percentages show with 2 decimal places but I am unable to change this.
I have tried selecting "Value Decimal Places" under Field Formatting in the Format Tile, but it appears to be stuck on "Auto"
Any ideas how to change this?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.