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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mgrayTCB
Helper III
Helper III

Relative Date Slicer and ALL Function not working

Is there something about the relative date slicer that impacts a measure that is calculating a sum based on all dates. When I create a date slicer that is a list of years or days my measure below works fine. But as soon as I change the the slicer type to a reative date ( where you can say next month or next year or last year, etc) the measure below is suddenly constrained by the time period in the relative slicer - and ALL no longer works. What am I missing? as you can see I tried all on all the components of the PBi generated date hierarchy

 

The report has one table that shows all the NetFeeCurrent based on the the date slicer and a secondary table that is supposed to show all the NetFeeCurrent regardless of date for whatever project is selected (hasonevalue). 

 

NetCurrentFee (all dates) =
var _projFee =
CALCULATE(
[NetFeeCurrent],
all(Rev[DateActOrEst],Rev[TagActOrEst]),
//All(dimDate[Date].[Year],dimDate[Date].[Month],dimDate[Date].[MonthNo],dimDate[Date].[Day],dimDate[Date].[Quarter],dimDate[Date].[QuarterNo],dimDate[Date].[Date])
all(dimDate[Date].[Year])
)
return
if(HASONEVALUE(Project[ProjectName]),_projFee,BLANK())
1 ACCEPTED SOLUTION

Ive tried that. Something else must be going on.

With the relative slicer and all(dimdate) i get the following which is not what I want.
The table the right is showing the correct total dollars 1.9MM I want it to list all the fee installments that make that up (they go back to 2018)


This sort of works but
1) it does not work with the realive date slicer above

2) if I include the date field in the table on the left then the table on the right only shows that one date but I want the table on the right show all dates for the selected project. I want it to ignor the date on the selected project and not propogate it through to the other table.

mgrayTCB_1-1638984980926.png

 

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@mgrayTCB , simply use all or allselected on date tbale

 

example

 

NetCurrentFee (all dates) =
var _projFee =
CALCULATE(
[NetFeeCurrent],
all(Rev[DateActOrEst],Rev[TagActOrEst]),
All(dimDate)
)
return
if(HASONEVALUE(Project[ProjectName]),_projFee,BLANK())

 

or


NetCurrentFee (all dates) =
var _projFee =
CALCULATE(
[NetFeeCurrent],
All(dimDate)
)
return
if(HASONEVALUE(Project[ProjectName]),_projFee,BLANK())

Ive tried that. Something else must be going on.

With the relative slicer and all(dimdate) i get the following which is not what I want.
The table the right is showing the correct total dollars 1.9MM I want it to list all the fee installments that make that up (they go back to 2018)


This sort of works but
1) it does not work with the realive date slicer above

2) if I include the date field in the table on the left then the table on the right only shows that one date but I want the table on the right show all dates for the selected project. I want it to ignor the date on the selected project and not propogate it through to the other table.

mgrayTCB_1-1638984980926.png

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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