Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I've seen this solution, but when I try it, the table[column] name can't be added to the measure. I'm just... so confused.
I have two swtiches that are adding unicharacter up/down/null arrows that are used to display an up/down/vertical arrows. The trick is, some results are good (up arrow), while some are bad (down arrow).... (example: good is +10% increase in users, but +10% in query time is bad) I have two switch statements that work on their own, but I'd like the data to show in a single row, using the ID of known 'bad' items being measured.
The issue I'm having is the Switch DAX measure won't accept the 'table'[column] name. Just gives me the sqiggle red-line of death.
Statement
IF('HI Team Metrics Details'[MasterID] IN {"24","31","9","32"}, // if the items equal this...
SWITCH( ///use this switch
TRUE(),
[m_difference%_filter]>0, UNICHAR(11014), //up
[m_difference%_filter]<0, UNICHAR(11015), //down
[m_difference%_filter]=0, UNICHAR(11020), //side
"" //empty
),
SWITCH( //if not, use this one
TRUE(),
[m_difference%_filter]<0, UNICHAR(11014), //up
[m_difference%_filter]>0, UNICHAR(11015), //down
[m_difference%_filter]=0, UNICHAR(11020), //side
"" //empty
)
)
error: (Column does not exist)
- I tried to build another measure to use in this If Statement to filter the ID's, but I'm still not able to add the column name.
Solved! Go to Solution.
@TDisco You're doing this as a measure, so you have no row context for the current value in the column. You can get the current value from that column by using SELECTEDVALUE:
IF('SELECTEDVALUE(HI Team Metrics Details'[MasterID]) IN {"24","31","9","32"}, // if the items equal this...
SWITCH( ///use this switch
TRUE(),
[m_difference%_filter]>0, UNICHAR(11014), //up
[m_difference%_filter]<0, UNICHAR(11015), //down
[m_difference%_filter]=0, UNICHAR(11020), //side
"" //empty
),
SWITCH( //if not, use this one
TRUE(),
[m_difference%_filter]<0, UNICHAR(11014), //up
[m_difference%_filter]>0, UNICHAR(11015), //down
[m_difference%_filter]=0, UNICHAR(11020), //side
"" //empty
)
)
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@TDisco You're doing this as a measure, so you have no row context for the current value in the column. You can get the current value from that column by using SELECTEDVALUE:
IF('SELECTEDVALUE(HI Team Metrics Details'[MasterID]) IN {"24","31","9","32"}, // if the items equal this...
SWITCH( ///use this switch
TRUE(),
[m_difference%_filter]>0, UNICHAR(11014), //up
[m_difference%_filter]<0, UNICHAR(11015), //down
[m_difference%_filter]=0, UNICHAR(11020), //side
"" //empty
),
SWITCH( //if not, use this one
TRUE(),
[m_difference%_filter]<0, UNICHAR(11014), //up
[m_difference%_filter]>0, UNICHAR(11015), //down
[m_difference%_filter]=0, UNICHAR(11020), //side
"" //empty
)
)
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
That is sheer sorcery. Thank you.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 151 | |
| 130 | |
| 109 | |
| 79 | |
| 54 |