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.
Hello,
I have a data set that looks like this (simplified):
ID | Step | Country |
34532 | String1 | USA |
543423 | String1 | USA |
454 | String2 | Canada |
3245 | String1 | USA |
3533 | String3 | Canada |
I need to count the occurences, so I created a table: SUMMARIZE('DataSet','DataSet'[Step])
Then I created a bidrectional relationship between 'Table' and 'Dataset' using [Step].
Then I added a new calculated column to 'Table': CALCULATE(COUNTA('Dataset'[Step]),allexcept('Table','Table'[Step]))
The reason why I am using a caculated table is because I need a cumulative count of the strings. I have a third column which uses the EARLIER function to achieve this.
All of this works fine. The problem occurs when I put the results into a visual on my report, the visual does not respond to any filters or other visuals. These filters and visuals are all based on 'Dataset', and THEY do respond to the visual when I click on each string count... it just doesn't work the other way around.
I suspect this is due to the ALLEXCEPT function ignoring any applied filters. So I used FILTER('DataSet','DataSet'[Step]='Table'[Step]) instead, and it still doesn't respond to my filters.
For example, if I elect to filter by USA, the visual does not respond. However, if I click on the Step 1 count, all the other visuals DO respond.
@Anonymous
I still can't understand your problem. As I tested, the visual with 'Table' populated will respond to filters properly.
Regards,
Sorry, my simplified table doesn't illustrate the issue. Try this one:
ID | Step | Country |
34532 | String1 | USA |
543423 | String1 | USA |
454 | String2 | Canada |
3245 | String1 | USA |
3533 | String3 | Canada |
452 | String2 | Canada |
325 | String2 | USA |
345 | String2 | USA |
When you filter for Canada, you'll see that it reports 0 counts for string 1. This is good. It also reports 4 counts for string 2... meaning it is including the counts for USA. This is not good. I only want it show to the 2 counts for Canada.
Thank you for your time in looking at this! It should be simple... but I just dont get it 🙂
I'm not sure if "bumping" a topic is good etiquette here, but I'm still stumped.
Hoping someone reading this will have an aha moment.
Try:
CounterforCanada = Calculate(COUNTA(Step), 'table1'[country] = "Canada")
Filtering all this might be an easy way if that works for you. Slicer it, otherwise code it in.
I can create individual measures, sure, but then my options for visuals is limited... and I can't use that visual to filter the rest of the report.
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 |