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.
I have to create a visualisation where on x axis I have 3 categories which has our business ( we are showing the spend amount for all the 3 category) now for example concider i have 3 categories A, B and C. In category A we are spending 80% of our total spend, in category B we have 15% of the total spend and category C has the remaining 5% as its spend value which is being shown on a bar. Now we want to keep the target as: For category A 25% of the total spend should be the target for category A, 70% of the total spend should be the target for category B,and 5% of the total spend should be the target for category C.
So, what i want is multiple target values ( target changes for all three category) I have created 3 measure to capture all the targets. Now if I update the target on combo chart (eg: if I have target for category A, it also shows on B and C) if I try to add filter on the category also puts the filter on the total spend amount giving incorrect value. beacuse of which my chart looks like :
each category target visible for all category type.
Can someone please help me create formula for the target lines and which visualisation would support it. trying to achive a visualisation shown below. where the target value only comes for there category type.
I am using formulas like:
for target value
And to show the target based on the total spend value I also made a measure:
Begin Date | Category | Spend |
3/20/2023 | A | 10748 |
5/30/2023 | C | 5259 |
5/16/2023 | C | 62733 |
7/5/2023 | A | 5701 |
4/11/2023 | A | 108120 |
8/4/2023 | B | 103131 |
3/16/2023 | A | 1246.98 |
4/12/2023 | A | 21398 |
5/16/2023 | A | 79695.32 |
@Anonymous , Create a measure and use that as a line in line clustered bar visual
Target =
var _m = calculate([Measure], allselected())
return
Switch(Max(Table[Category]) ,
"A", _m*.75 ,
"B", _m*.20 ,
_m*.05
)
and use this measure as line , enable marker and use line width =0
Hi @Anonymous
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
User | Count |
---|---|
84 | |
80 | |
70 | |
47 | |
43 |
User | Count |
---|---|
108 | |
54 | |
50 | |
40 | |
40 |