Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
Can anyone help with the legends in the bar chart. If nothing is selected in the slicer then it should pick type1 as the legend and if we select anyone or more then it should show type2 as legend.
Solved! Go to Solution.
HI @hiren89vora,
For your scenario, I'd like to suggest you write a measure formula with an if statement and isfiltered function to check the selections.
After these steps, you can use this measure on the value field to replace the raw field to achieve your requirement.
ISFILTERED, ISCROSSFILTERED – DAX Guide - SQLBI
If you are confused about the coding formula, please share some dummy data to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
HI @hiren89vora,
For your scenario, I'd like to suggest you write a measure formula with an if statement and isfiltered function to check the selections.
After these steps, you can use this measure on the value field to replace the raw field to achieve your requirement.
ISFILTERED, ISCROSSFILTERED – DAX Guide - SQLBI
If you are confused about the coding formula, please share some dummy data to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
@hiren89vora , You Have Create mesure like
=
var _is = calculate(isfiltered(table[type]), allselected())
return
If(_is , [Measure], calculate([Measure], filter(Table, Table[Type] = "type 1" ) ) )
User | Count |
---|---|
98 | |
91 | |
84 | |
71 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |