Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
45 |