Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
You'll see in this example I have a SampleNumber that can contain 1 or more tests. The GoalGroup will always have the same repeating text per SampleNumber. When you do a count of GoalGroup, you'll get 12 as this is counting all of the tests. I however want 7 as that is how many GoalGroups there are per unique SampleNumber. I was able to create a measure to count 1 GoalGroup per SampleNumber.
How can I go about getting these 5 goal groups to display correctly in a "100% Stacked column chart" within the "Legend" field? I'd like to be able to choose which column will be displayed via the "Category Field" column. I would like to do this without unpivoting the table as there are a million samples that are within my data and would not like to multiply my data by 5 causing it to go over my size limit. When I manually swap out Legend to GoalGroup_1 or GoalGroup_2 the data displays correctly in the chart.
I have data as follows:
Measure to count distinct GoalGroup per SampleNumber
The stacked column chart works when I manually change the legend. However, the Legend will not take measures, and from my understanding calculated columns only calculate upon data refresh so it won't work when passing the the distinct GoalGroup text per SampleNumber dynamically.
Hi @A_Fast_Panda ,
Have you tried using the field parameters?
https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
This will allow for you to change the legend dinamically using the columns you need on your dataset.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@MFelixThis seems to have worked great for the legend field. I'm assuming using my new measure below "GoalGroupSelectedParameter" instead of "Filter_GoalTAT" in my dynamic measure is the best way to go about getting Y-Axis counts per GoalGroup? If so, is there any way to have my field name be GoalGroup name dynamic so it's not just 1 general name?
User | Count |
---|---|
84 | |
77 | |
76 | |
43 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
45 | |
43 |