Forum Discussion
How to create parameters on many columns
Hello guys,
I have a table with 5 columns : channels, hours, UK flag, US flag and FR flag.
It tracks if the channel is displayed in any of those 3 countries.
The channel can be displayed at the same time so 0 to 3 flags can be true.
I would like to have a dropdown menu to see the total hours for the UK or US or FR (basically like a filter on the country).
I tried with a IF statement but as there are many true conditions it leaves the loop at the first true element.
Thanks for your help !
Kr,
Jay
3 Replies
- amitchandak
Super User
Anonymous , The information you have provided is not making the problem clear to me. Can you please explain with an example.
See if this can help - https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-february-2020-feature-summary/#_Hierarchical_slicerhttps://www.youtube.com/watch?v=cyOquvfhzNM
Appreciate your Kudos. - AnonymousNot applicable
Anonymous
You expected output is not clear, can you provide some visual explanations? Regarding to your IF function, you could try use Switch(True()) for multiple conditions, please refer to https://blog.enterprisedna.co/using-switch-true-logic-in-power-bi-dax-concepts/
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - AnonymousNot applicable
Anonymous amitchandak
Hello,
Thanks for your answers.
I cannot do exactly what I want with the solutions suggested.
Let me rephrase the issue for more clarity.
There are 5 columns:
Program (Name of the TV show),
Duration (Length of the program in hours),
Country_1 (Boolean – TRUE() if the “Program” is broadcasted in the country otherwise FALSE()),
Country_2 (Boolean – TRUE() if the “Program” is broadcasted in the country otherwise FALSE()),
Country_3 (Boolean – TRUE() if the “Program” is broadcasted in the country otherwise FALSE()),
I would like to build a bar chart with “Program” as dimension and “Duration” as value.
I would like to be able to filter this bar chart based on a filter which contains ONLY those 4 options: Country_1 (keep all the shows display in country 1), Country_2 (keep all the shows display in country 2), Country_3 (keep all the shows display in country 3) and Keep all.
The tricky aspect is that the countries are not exclusive so Program_1 can be broadcasted in both Country_1 and Country_2. Where I am struggling is to build the filter on the bar chart.
Hope it’s clearer.
Let me know if you need any additional information,
Thanks for the help.