Forum Discussion
How to "flatten" a variable into constant?
- 3 years ago
File attached
First, I'd suggest you follow the rules for DAX formatting: Rules for DAX Code Formatting - SQLBI. DAX that's not formatted the right way is not DAX (and many specialist don't even look at such code). Second, I'd suggest you paste something that can be tinkered with and copied. Nobody wants to type text in from a picture. Third, I'd also kindly suggest that you create a sample file which demonstrates the issue and paste a link to it here so that it's easier for us to troubleshoot. The file should be stored on a shared drive and have public access rights.
- Palmtop3 years ago
Helper I
Hello daXtreme,
Thanks for the advice. I've edited my post with the formatted DAX measure and a link to a sample file. Let me know if anyone has difficulties accessing it. Otherwise, I hope this is a good starting spot to help solve the issue.
- daXtreme3 years ago
Solution Sage
File attached
- Palmtop3 years ago
Helper I
Hi daXtreme,
Thank you, it worked like a charm. I appreciate all the help and patience. Also the clode cleanup is very welcomed 😉 .
I read through the date table page from PowerBI -
https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-date-tables
but still don't fully understand why is it exactly that auto-generated hierarchies in my initial model caused the issues it did, and how getting rid of them by making a date table fixed the issues.
Thanks again!