Forum Discussion
Using slicer for sum of columns
- 5 years ago
Hey Anonymous ,
you should unpivot the month columns. You can do that like this:
Then you can rename the "Attribute" column to "Date", replace the values with real dates and then you can slice by date in the report.
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic - 5 years ago
Anonymous understood, but as a best practice and a scalable solution, it is always good to have unpivoted data. There is always create a better model or write a complex DAX to achieve the business goal. You decide what to pick. So better to revisit your solution by revisiting that this needs to be unpivoted. All the best.
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- Anonymous5 years ago
Anonymous
Dax calculation is based on rows not column, the best solution for is to transform the table making the month into rows then you can create a slicer to filter to interact. If you are worrying about later report creation. You can just duplicate the table then use the new table for this sum calculation.Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Hey Anonymous ,
you should unpivot the month columns. You can do that like this:
Then you can rename the "Attribute" column to "Date", replace the values with real dates and then you can slice by date in the report.
Hey selimovd thanks for the help.
I wonder if there is any other alternative to solve this. Since this is a very simplified example of the real data that I'm handling, and the dashboard has many others graphics and variables, I don't know if by "unpivoting" my data, managing the information of the other columns would be more difficult.