Forum Discussion
Need guidance
- Anonymous3 years ago
Hi Anonymous ,
Please refer to my pbix file.
Measure = VAR _1 = SELECTEDVALUE ( data[Date] ) VAR _format = FORMAT ( _1, "MMM" ) VAR _YEAR = YEAR ( _1 ) RETURN IF ( _1 = SELECTEDVALUE ( 'Table'[Date] ), 1, IF ( _format = SELECTEDVALUE ( 'Table'[ Month] ) && _YEAR <> SELECTEDVALUE ( 'Table'[year_colun] ), 1 ) )How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ PollyIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I do not understand your filter logic. Do you want to compare your current seleted month with the privious year (same month)?
Also I need some data example no screenshot. If rank is calculated also the DAX definition.
- Anonymous3 years agoNot applicable
The goal is compare current year Date with previous year Date (not Month vs Month)
As the dates are not consistent , I added rank (this is optional )
Here is the test DATA. The eamples were added in my first request.Date Month Year Rank 8/14/2021 Aug Aug-21 1 8/28/2021 Aug Aug-21 2 8/20/2022 Aug Aug-22 1 12/5/2020 Dec Dec-20 1 12/4/2021 Dec Dec-21 1 12/3/2022 Dec Dec-22 1 12/31/2022 Dec Dec-22 2