Forum Discussion
Anonymous
4 years agoNot applicable
Dynamic Dax based on date filters
Hi, I'm trying to create a dynamic table based on date selection as the below DAX, but the problem is in the output where the Difference appears on both dates , not as a total difference, does any...
- 4 years ago
Salam Anonymous
This will return the desired result under the 2nd date
Difference = VAR PreviousDate = MAX ( 'last month GL summary'[MIS_DATE] ) - 1 VAR CurrentDateValue = SUM ( 'last month GL summary'[USD_currency] ) VAR PreviousDateValue = CALCULATE ( SUM ( 'last month GL summary'[USD_currency] ), 'last month GL summary'[MIS_DATE] = PreviousDate ) RETURN CurrentDateValue - PreviousDateValue
tamerj1
Community Champion
4 years agoSalam Anonymous
This will return the desired result under the 2nd date
Difference =
VAR PreviousDate =
MAX ( 'last month GL summary'[MIS_DATE] ) - 1
VAR CurrentDateValue =
SUM ( 'last month GL summary'[USD_currency] )
VAR PreviousDateValue =
CALCULATE (
SUM ( 'last month GL summary'[USD_currency] ),
'last month GL summary'[MIS_DATE] = PreviousDate
)
RETURN
CurrentDateValue - PreviousDateValue
Anonymous
4 years agoNot applicable
Thanks a lot, I fixed the equation but I still have another problem , I don't want to show the columns with Differences zero I only want to show the final difference in the matrix, Is there a solution for that?
- tamerj14 years ago
Community Champion
Anonymous
Easiest way is to hide it simply using your mouse - reduce the column width to zero- Anonymous4 years agoNot applicable
Yes, but unfortunately when changing the date slicer , the columns appear again, I thought maybe creating two visuals and grouping them, if there is a better solution I would appreciate it Thanks 🙂
- tamerj14 years ago
Community Champion
Anonymous
Excellent idea 👍