Forum Discussion
DAX selected years
- 3 years ago
Hello
after a lot of struggle i found the solution to my problem
basically I had to create several calendars and use the formula CALCULATE([Year Value],USERELATIONSHIP('Calendar Year 1'[Date],Sales[Date])) for each selected year
it Works very well
send the example for knowledge
EXEMPLEThank you all for your help
thanks ibendlin
I read a lot about filters with dax but I'm still having difficulties comparing the year 2022 with 2020 and 2020 with 2014 for example
I have slicer per year and as I said at the beginning the user can choose any slicer year
I didn't say filters, I said "the FILTERS() function". These are slightly different things. The FILTERS () function allows you to retrieve the currently selected values of a column, and to then create computations in DAX with them.
Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523