This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Need help with what I think is a simple DAX formula. I have a visual that looks like this. The count field is ia measure I defined in a DAX formula that defines the count field as either 1 or 0. For some reason when I turn on the option to show totals for this visual, the count shows as 0
I want to be able to sum up the count field to the country level, so that I can get a total for Argentina of 3. Instead of showing 3, the value shows 0.
I've tried various DAX formulas but can't get it. The count field is a measure I define in a DAX formula that results in a value of either 1 or 0.
Solved! Go to Solution.
Hi,
May be your Count measure can be modified to get the correct total but since i do not know what that measure is, try this one
Measure = IF(HASONEVALUE(Data[District]),[Count],SUMX(VALUES(Data[District]),[Count]))
Hope this helps.
You are welcome. If my previous reply helped, please mark that as Answer.
Hi,
May be your Count measure can be modified to get the correct total but since i do not know what that measure is, try this one
Measure = IF(HASONEVALUE(Data[District]),[Count],SUMX(VALUES(Data[District]),[Count]))
Hope this helps.
Hi...Your solution did it!...thanks
You are welcome. If my previous reply helped, please mark that as Answer.
Try something like the formula:
New Count = IF(HASONEVALUE(Table[District]),
[Count],
SUMX(
ADDCOOLUMNS(
SUMMARIZE(Table, [Country], [District]), "count measure", [Count]
),
[count measure])
)
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 | |
| 19 | |
| 17 | |
| 14 |
| User | Count |
|---|---|
| 24 | |
| 23 | |
| 20 | |
| 20 | |
| 19 |