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
abap32
Frequent Visitor

DAX counting rows that are filterd by a slicer

Hello there,


i have a month slicer witch uses the value MonthID and looks like this: 
Untitled.png


I also have a measure: 
myMeasure= CALCULATE(
IF (
(COUNT ( table.column1 )) = BLANK (), 0 ,
(COUNT ( table.column1] )))
)

I want to change the code of the measure to only count rows inside the chosen date range. 

Could you please help me? Thank you

3 REPLIES 3
cthurston
Advocate II
Advocate II

Without seeing your tables/fields this is my best guess:

= CALCULATE(
COUNT(table.column1
             ),
ALLEXCEPT('MonthIDtable','table'[MonthID]
                   ),
ISBLANK(table.column1
               )<>TRUE()
)

Thank you very much for your answer cthurston, but i need a date range and not to exclude only one month with the ALLEXCEPT function. That didnt work for me unfortunatelly.

Can you provide a relationship and data sample?

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.