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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Clout
Helper III
Helper III

Measures with 0 values on the beginng of the Dataset are not scaling with time slicer

Hello guys,

I have some key figures, which have been measured about one year after the first date of the existing dataset. So if I use a line chart, the Y-Axis scales with the first existing value which is not null. So one visual shows the line chart from 2020 till 2021 and the another line charts are showed from 2019 till 2021.

So i puted on this Measure for the key figure: [Key Figure] + 0 to put the null values as 0 values, so the X-Axis from the key figure scales from 2019 till 2021.

But if I put the slicer from 2020 till 2021, they X-Axsis is still showing 2019 till 2021 and is not scaling with them.

 

Here two pictures:

 

Here you can see the zero values to scale the left visual.

1.PNG

 

And here you can see, that the left line chart isnt scaling anymore with the slicer, it only puts the values which are not in this time intervall to zero values too.

 

2.PNG

 

 

Is there any solution for this?

 

Thanks in advance!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Clout , Try to control impact of +0 using a measure like

 

0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +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(), _1))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Clout , Try to control impact of +0 using a measure like

 

0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +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(), _1))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Great, thank you very much!

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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