Forum Discussion
Anonymous
3 years agoNot applicable
Complex Dates compare
Hello Experts, Please help me with this date comparison. I have a dates table with Snapshots Column where we take Snapshots every other Saturday. Sometimes there may be only one snapshot per month....
andhiii079845
3 years agoSolution Sage
My solution:
1) First you need a second table "Dimtable" with distinct date values from the other table (Via Power Query Editor: reference table and remove duplicate )
2) Create a slicer with the Dimtable Date column and matrix with date, sales column from the table "example"
3) DAX Formular:
FilterData =
VAR _selectmonth2 = MONTH(SELECTEDVALUE(Dimtable[Date]))
VAR _currentmonth = MONTH(maxx(example,example[Date]))
VAR _filter = IF(_currentmonth=_selectmonth2,1,0)
RETURN _filter
4) Filter the matrix visual with the FilterData Measure (greater than or equal to 1)
I hope this was a good walkthrough.
Anonymous
3 years agoNot applicable
Could you please share the dataset with me?
Thank you
- andhiii0798453 years agoSolution Sage
- Anonymous3 years agoNot applicable
Hi andhiii079845 ,
Your solution is good for Month Selection. I want it by date.
EX:If the user Selects
CY 12/03/2022 The output should be like below.
CY 12/03/2022 100 LY 12/04/2021 299 LLY 12/05/2020 150 Thanks a lot for your time.
- andhiii0798453 years agoSolution Sage
What do you mean per date? The slicer is via date ans than looking for the same month in a other year. I not really understand the logic.