Forum Discussion
Bar chart - Filter on this Visuals -> basic filtering where value = Measure
- 5 years ago
Hi jayvataliya
Keep the previous measure and create a visual control measure for each visual and apply it in the visual filter:
visual control_1 = IF ( SELECTEDVALUE ( 'Source table'[FailReason] ) = [Top1 fail], 1 )Please refer the below sample file, hopes it could help.
Hi jayvataliya ,
Sorry for replying late. Based on your description, you actually create a measure to show the top1 fail reason name:
Top1 fail =
VAR tab =
SUMMARIZE (
ALL ( 'Source table' ),
'Source table'[FailReason],
"Sum", SUM ( 'Source table'[Amount] )
)
VAR tb =
ADDCOLUMNS ( tab, "rank", RANKX ( tab, [Sum],, DESC, DENSE ) )
RETURN
MAXX ( FILTER ( tb, [rank] = 1 ), [FailReason] )
But you can not put the measure in the 'text' field in the filter when you are using Advanced filter.
Instead, you can use the TopN filter directly to ger the top 1 fail reason by the sum of Amount for each reason.
Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jayvataliya5 years agoFrequent Visitor
Thank You v-yingjl for your reply. It definitely helped to get the rank of fail reason.
However, I am trying to display the data of each reason in a separate chart visual.
- Eg.
- Chart 1 = Wrong Input
- Chart 2 = AAA
- Chart 3 = BBB
At this point, the chart shows all of the reason values.
- v-yingjl5 years agoCommunity Support
Hi jayvataliya ,
As I previous post, just adjust the TopN filter as Top1,2,3 for Amount for each bar chart so that you can get the expected output.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- jayvataliya5 years agoFrequent Visitor
hmm, it seems like TopN doesn't work that way.
In the below screenshot, the 2nd chart(2.AAA) shows both the reason instead of only the 2nd fail reason. it is trying to find TOP 2 reasons by the amount.
- Eg.