Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
In the attached file, there is a visual which I need to create in Power BI. The problem is the individual is getting filtered by country and category. I can create individual visuals to filter them individually in the Dax statement but the problem is when the new country will come in the dataset then this will fail and automatically visuals will not be filtered or created. I will have to create the visual for a particular country each time a new country is added.
Any alternatives?
Regards,
Kaushlendra Mishra
hi @kpl_999
Why when the new country will come in the dataset then this will fail and automatically visuals will not be filtered or created?
If you drag country field into visual, it should be updated after dataset refresh.
Could you please share your sample pbix file for us have a test?
Regards,
Lin
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi @kpl_999
I would write two DAX formulas for both as one will serve for Country and the other for category.
It will be better if you provide your table structure with sample data of all the columns used in the screenshot. this helps you get the exact solution rather than multiple replies asking for different information about data.
So, I am not sure how you are geting all the columns in the report. Considering they are all in rows for each country and categorywise and is calculated using a measure named measure_x and average is required for display.
_country_level = Calculate(AVERAGEX(table,table[measure_x]), ALLEXCEPT(table,table[country]))
_category_level = Calculate(AVERAGEX(table,table[measure_y]), ALLEXCEPT(table,table[category]))
If required, you may have to create a calculated field for each column and use SUMX, MAXX, AVERAGEX as required.
By using the above calculation you will not have to worry about new country or category.
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |