Forum Discussion
DAX-Calculation best practice
Thanks for response!
Sometimes in the data I get the value "Infinite" so it is obviously not working as planned...
About your conclusions:
- Are you referring to creating flags that define Workgroup without GDPR? True or false, 1 or 0 so to speak.
- Not sure what you mean. What is it exactly I am doing that is filtering the table and how are you suggestion I should do?
- Never used SWITCH, so it's a preferable solution instead of nested IF-statements?
Sorry if this code is looking crazy, I am basically a QLIK developer that are currently trying to learn best practices for PBI atm. It is hard in terms of logic to go from on language to another, they are very different in many regards.
BR Fredrik
There would be too much to expand upon. Grab a good book on DAX and study. THe best by far is "The Definitive Guide to DAX" by Alberto Ferrari and Marco Russo.
About your conclusions:
- Are you referring to creating flags that define Workgroup without GDPR? True or false, 1 or 0 so to speak.
- Yes. You should not perform free-form text searches in columns as this is slow (especially on large data sets). Instead, massage your data into the right format using Power Query.
- Not sure what you mean. What is it exactly I am doing that is filtering the table and how are you suggestion I should do?
- This is something that you'll learn as soon as you start studying DAX properly. Read the book I mention. Basically, you should never place a full table as a filter in CALCULATE. Instead, you should only use the relevant columns with or without KEEPFILTERS depending on what you want to achieve.
- Never used SWITCH, so it's a preferable solution instead of nested IF-statements?
- Yes, use SWITCH with many conditions as it's easier to read and maintain.
- Anonymous3 years agoNot applicable
Great, I'll buy that book!
- How do I massage my data with Power Query in this case? I need to solve this in a short period of time.. Do you have any direction you can point for to more specifically?
- So KEEPFILTERS instead of FILTER is better?
- Ok, I'll try that out.
Can you give an example if I need a flag to filter Source = Genesys as an example. Should I then create a DAX formula for this?
BR Fredrik
- daXtreme3 years ago
Solution Sage
Anonymous
Please learn to use Power Query. It can do anything that you could imagine with your data. Most things just by clicking a button. There are millions of vids on YT about Power Query...
- Anonymous3 years agoNot applicable
Unfortunately this does not help me at all short term.
I need more specific help rather then "learn Power Query".