Forum Discussion
Gone measure results after Matrix value selected
- Anonymous5 years ago
Hi Analitika ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. I created a column chart as a custom legend... And for SELECTEDVALUE( ) return the value which the field filtered, it will return no data if there is no data selected...
You can also refer the below video to get it.
Want a custom LEGEND for your Power BI visual? WATCH THIS!
Best Regards
Hi Analitika ,
As checked your post description, the line chart using the field DimChannel[ChannelName] not the field 'DimChannelTotal'[ChannelName], so please update the formula of your measure [SalesAmountWithTotal] as below and check whether you can get the correct result:
| SalesAmountWithTotal = VAR _CurrentAxis = DimChannel[ChannelName] RETURN IF ( _CurrentAxis = "Total", IF ( SELECTEDVALUE ( YesNo[Values], 1 ) = "Yes", SUM ( FactSales[SalesAmount] ), BLANK () ), CALCULATE ( SUM ( FactSales[SalesAmount] ), DimChannel[ChannelName] = _CurrentAxis ) ) |
Best Regards
Nope. this is not working, as DimChannel[ChannelName] never = "Total"
As Total is custom created field, so if i do like your example i loosing Total line in chart
- Anonymous5 years agoNot applicable
Hi Analitika ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. I created a column chart as a custom legend... And for SELECTEDVALUE( ) return the value which the field filtered, it will return no data if there is no data selected...
You can also refer the below video to get it.
Want a custom LEGEND for your Power BI visual? WATCH THIS!
Best Regards