The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a real simple question - I have a model that focusses on outcomes by ethnicity. I have in the past created measures that filter by ethnicity (only have 3 options, total, Indian descent and non- Indian descent) should I do this in DAX or apply filters to the measures?
Solved! Go to Solution.
Hi @sperry -
In my opinion, hard-coding should be avoided whenever possible. The beauty of PowerBI is that as long as you don't hard code measures (or visual/page/report filters), it automatically scales if you find yourself with more choices than you originally had. I would use ethnicity as a dimension and put it in "Legend" wherever possible on a visual, or as a column for table/matrix. Then your measures will automatically have the filter applied.
If this doesn't work for you, please provide a pbix or sample data/model structure so we can see your individual case.
Hope this helps
David
@sperry , A Slicer, or visual/page filter is better as it filters out the data. It filters for all measures (unless they ignore slicer value) .
In case of measure, if you two-measure those need filters. Both measures need to have this filter. So better to have a slicer/filter in such a case.
@sperry , A Slicer, or visual/page filter is better as it filters out the data. It filters for all measures (unless they ignore slicer value) .
In case of measure, if you two-measure those need filters. Both measures need to have this filter. So better to have a slicer/filter in such a case.
Hi @sperry -
In my opinion, hard-coding should be avoided whenever possible. The beauty of PowerBI is that as long as you don't hard code measures (or visual/page/report filters), it automatically scales if you find yourself with more choices than you originally had. I would use ethnicity as a dimension and put it in "Legend" wherever possible on a visual, or as a column for table/matrix. Then your measures will automatically have the filter applied.
If this doesn't work for you, please provide a pbix or sample data/model structure so we can see your individual case.
Hope this helps
David
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
79 | |
71 | |
48 | |
41 |
User | Count |
---|---|
138 | |
108 | |
71 | |
64 | |
58 |