Forum Discussion
IAA
6 years agoHelper I
Dateadd with filter/if statement?
Dear community, I have a problem with the following: I am creating a cashflow forecast, which is shown in the picture below. The idea is that when the parameter is 2, the date of paying/recevi...
- 6 years ago
Hi IAA ,
Create a slicer table as below:
Slicer Table = DISTINCT('Value by date 2'[Category])Then create a measure as below:
Measure = IF(MAX('Value by date 2'[Category]) in FILTERS('Slicer Table'[Category]),CALCULATE ( AVERAGEX(FILTER(ALL('Value by date 2'),'Value by date 2'[Category]=SELECTEDVALUE('Slicer Table'[Category])), 'Value by date 2'[Value]),DATEADD( DimDate[Date], [Value Parameter], DAY)),CALCULATE(AVERAGE('Value by date 2'[Value]), DATEADD( DimDate[Date], [Value Parameter], DAY)))Finally you will see:
For details,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
v-kelly-msft
6 years agoCommunity Support
Hi IAA ,
Create a slicer table as below:
Slicer Table = DISTINCT('Value by date 2'[Category])
Then create a measure as below:
Measure =
IF(MAX('Value by date 2'[Category]) in FILTERS('Slicer Table'[Category]),CALCULATE ( AVERAGEX(FILTER(ALL('Value by date 2'),'Value by date 2'[Category]=SELECTEDVALUE('Slicer Table'[Category])), 'Value by date 2'[Value]),DATEADD( DimDate[Date], [Value Parameter], DAY)),CALCULATE(AVERAGE('Value by date 2'[Value]),
DATEADD( DimDate[Date], [Value Parameter], DAY)))
Finally you will see:
For details,pls see attached.
Best Regards,
Kelly
Kelly
Did I answer your question? Mark my post as a solution!