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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DebbieE
Community Champion
Community Champion

SUMMARIZE with a WHERE Clause

SummaryTable =
SUMMARIZE (
'fact Fact',
'fact Fact'[ID],
"Frequency", COUNT ('fact Fact'[ID]))
 
Ive created a table as above to get frequencies of an ID
However I have alot of Null IDs in the table (Set to 0) and I dont want them adding to the table because there are too many records against them. For example
 
ID    Frequency
0     1023
93   4
23   2
11   1
29   3
66   3
 
Is there any way I can clear out anything where ID = 0 in this Summary table?
1 ACCEPTED SOLUTION
DebbieE
Community Champion
Community Champion

SummaryTable =
SUMMARIZE (
'fact Fact',
'fact Fact'[ID],
"Frequency", IF('fact Fact'[ID]<>"0",COUNT ('fact FactComplaints'[ID]))
 
)
 
Sorted. if the ID is not 0 then continue with the count. Else do nothing

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

If it's visual only you can simply use the build in filter panel. 

Drag the frequency field into the filters pane and filter out "is not 0"

I use it for another DAX query so I want it built into the statement

DebbieE
Community Champion
Community Champion

SummaryTable =
SUMMARIZE (
'fact Fact',
'fact Fact'[ID],
"Frequency", IF('fact Fact'[ID]<>"0",COUNT ('fact FactComplaints'[ID]))
 
)
 
Sorted. if the ID is not 0 then continue with the count. Else do nothing

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.