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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors