Forum Discussion
How to stack 2 columns in the legend?
How can I stack Column 1: Pending Request count and Column 2: 100 Days Old in one bar in stacked column chart? It seems I can only use one column on the Legend.
Basically, I want to show that Joe has 50 open tickets and 8 of those 50 tickets or 16% are more than 100 days old. And he failed the target as he has more than 10% of 100 days old tickets
Output should be somethng like this:
Is this possible?
- Anonymous9 years ago
HI zpaul_010,
So you want to count the pending states records and use the '100 days' as the category, right?
If this is a case, you can refer to below steps if it suitable for your requirement.
1. Use 'Technical', "100 days", 'Pending Status' to create the 100% stacked column chart.(Drag 'Technical' to axis, "100 days" to legend, 'Pending Status' to value and switch it to summary mode count)2. Turn on the data label, drag 'Pending Status' to page level filter and filter the 'pending' records.
3. Add a constant line as the target line, set the value to 0.1.
BTW, current power bi not support to drag multiple columns to legend field; if you use legend, you can't drag multiple columns to value field.
Regards,
Xiaoxin Sheng
3 Replies
- Greg_Deckler
Community Champion
Can you provide some sample data?
- zpaul_010
Helper I
100 days = if(DATEDIFF('ManageEngine Report Framework'[Created Time].[Date],TODAY(),DAY)>=100,"Yes", "No")
PendingStatus = if('ManageEngine Report Framework'[Request Status] = "closed" || 'ManageEngine Report Framework'[Request Status] = "Cancelled" || 'ManageEngine Report Framework'[Request Status] = "Resolved","Closed","Pending")
- AnonymousNot applicable
HI zpaul_010,
So you want to count the pending states records and use the '100 days' as the category, right?
If this is a case, you can refer to below steps if it suitable for your requirement.
1. Use 'Technical', "100 days", 'Pending Status' to create the 100% stacked column chart.(Drag 'Technical' to axis, "100 days" to legend, 'Pending Status' to value and switch it to summary mode count)2. Turn on the data label, drag 'Pending Status' to page level filter and filter the 'pending' records.
3. Add a constant line as the target line, set the value to 0.1.
BTW, current power bi not support to drag multiple columns to legend field; if you use legend, you can't drag multiple columns to value field.
Regards,
Xiaoxin Sheng