Forum Discussion
mamunxv8
2 years agoHelper I
Date Wise Data Show
Hi, I want to make a table like that. The problem is that I can't show the data with column-wise date. I don't want any calculation here; I want to show the last two entry date data. Can I...
- 2 years ago
Thanks for the help. I found out different ways to set two days parallel. Also, as I want, find out the last two days from the dataset.
Here is Dax formula:
LastDayData =VAR MaxDate = CALCULATE(MAX('Tablename'[Date]), ALL('Tablename'[Date]))RETURNCALCULATE(SUM('Tablename'[Close]), 'Tablename'[Date] = MaxDate)SecondLastDayData =VAR SecondLastDate = CALCULATE(MAX('Tablename'[Date]), FILTER(ALL('Tablename'[Date]), 'Tablename'[Date] < MAX('Tablename'[Date])))RETURNCALCULATE(SUM('Tablename'[Close]), 'Tablename'[Date] = SecondLastDate)Thanks
Anonymous
2 years agoNot applicable
Hi mamunxv8 ,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information and description to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
mamunxv8
2 years agoHelper I
Thanks for the help. I found out different ways to set two days parallel. Also, as I want, find out the last two days from the dataset.
Here is Dax formula:
LastDayData =
VAR MaxDate = CALCULATE(MAX('Tablename'[Date]), ALL('Tablename'[Date]))
RETURN
CALCULATE(SUM('Tablename'[Close]), 'Tablename'[Date] = MaxDate)
SecondLastDayData =
VAR SecondLastDate = CALCULATE(MAX('Tablename'[Date]), FILTER(ALL('Tablename'[Date]), 'Tablename'[Date] < MAX('Tablename'[Date])))
RETURN
CALCULATE(SUM('Tablename'[Close]), 'Tablename'[Date] = SecondLastDate)
Thanks