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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
eliasayyy
Memorable Member
Memorable Member

Measure works on values of slicer but 1 fails

hello everyone is have caelndar table,

i have a custom date table to allow me to choose between "last 30 days" , "last 60 days" , "last 90 days" , "current year" , "custom"

annonymous1999_0-1688478650525.png


i made 2 measures

impressions = sum(impressions)

splm impressions = 

SUMX(VALUES('Calendar'[Date]),CALCULATE([impressions] ,DATEADD('Calendar'[Date],-1,MONTH)))

it works well i get what i want but when i add the filter , 

it doesnt work on 30 days but work on more than 30 days and first month is empty

annonymous1999_1-1688478750722.png


here i seelct 60

annonymous1999_2-1688478779918.png

 


as you see may is empty but it works from june and so on 

here is no filters

annonymous1999_3-1688478816371.png

 



you can see that i indeed have in may splm value and it shouldnt be blank 

can someone help please

2 ACCEPTED SOLUTIONS
AlanFredes
Resolver IV
Resolver IV

Hi,

 

This issue is due to the date range filter (in Date Range List PvP) you are using. When selecting last 30 days the DAX formula no longer has more than 30 days of history to work with and that is why the "splm impressions" measure is showing up empty. In the other date ranges you mentioned there is more than 1 month of history for the first days but if you look at the tail end of the data you will notice data will start going blank again.
To fix this issue you will need to set the data range you need to calculate and then break the date range filter. Something like this might work:

 

splm impressions = 

Var Max_Date =MAX('Calendar'[Date])

Var Min_Date = MIN('Calendar'[Date])
RETURN

CALCULATE(

SUMX(VALUES('Calendar'[Date]),CALCULATE([impressions] ,DATESBETWEEN('Calendar'[Date],Min_Date,Max_Date))),
REMOVEFILTERS('Date Range List PvP')
)

 

Did I answer your question? Mark my post as a solution!

View solution in original post

hello yes it worked for me the dates between isnt necessary i just had to add removefilter(date pvp[type]) 

View solution in original post

2 REPLIES 2
AlanFredes
Resolver IV
Resolver IV

Hi,

 

This issue is due to the date range filter (in Date Range List PvP) you are using. When selecting last 30 days the DAX formula no longer has more than 30 days of history to work with and that is why the "splm impressions" measure is showing up empty. In the other date ranges you mentioned there is more than 1 month of history for the first days but if you look at the tail end of the data you will notice data will start going blank again.
To fix this issue you will need to set the data range you need to calculate and then break the date range filter. Something like this might work:

 

splm impressions = 

Var Max_Date =MAX('Calendar'[Date])

Var Min_Date = MIN('Calendar'[Date])
RETURN

CALCULATE(

SUMX(VALUES('Calendar'[Date]),CALCULATE([impressions] ,DATESBETWEEN('Calendar'[Date],Min_Date,Max_Date))),
REMOVEFILTERS('Date Range List PvP')
)

 

Did I answer your question? Mark my post as a solution!

hello yes it worked for me the dates between isnt necessary i just had to add removefilter(date pvp[type]) 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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