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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
cpassuel
Frequent Visitor

Adding + 0 to a mesure and chart filtering issue with Auto date/time enabled

Hello,

 

I have a table of incidents with a incident creation datetime and an incident id. I created a measure to count the number of incident and added a + 0 to prevent displaying Blank : Nb = COUNTROWS(data)+0

 

On my page, I have a slicer on creation time to filter on the n latest months. When I add this measure on a line or a bar chart, the time slicer is not applied and it displays all the months. I don't really understand why. When I don't add the + 0 in the measure, filter is working as you can see in the picture.

I tried also VAR nb = COUNTROWS(dataRETURN IF(ISBLANK(nb), 0, nb) with no success.
 
How to fix it ? Is is a bug on the visual ?
 

After further investigations, I found that this issue is related to the Auto Date/time feature. When it's enabled, filter does not work properly.

ChartFilterError.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @cpassuel ,

 

+0 forces left join.

In this case you will need to add the slicer as filter condition in the formula:

Measure = 
VAR nb = COUNTROWS(data)+0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), nb ))

 

Best Regards,

Jay

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @cpassuel ,

 

+0 forces left join.

In this case you will need to add the slicer as filter condition in the formula:

Measure = 
VAR nb = COUNTROWS(data)+0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), nb ))

 

Best Regards,

Jay

Anonymous
Not applicable

Hi

 

try COUNTROWS(ALLNONBLANKROW(DATA))

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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