cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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.

1 ACCEPTED SOLUTION
Community Support

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

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
2 REPLIES 2
Community Support

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

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Anonymous
Not applicable

Hi

try COUNTROWS(ALLNONBLANKROW(DATA))