Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
shaileng
Frequent Visitor

Simple DAX question

Hi there,

 

Quick DAX question :

 

I have a table TABLE_DATA with 3 cols COLA,COLB,COLC.

I have another table named TABLE_SUPPORT which holds 3 rows like "OptionA","OptionB" and "OptionC"

 

I have a report with 2 visuals i.e.,

1. A drop down slicer based on TABLE_SUPPORT to select a value from one of 3 options

2. A pie chart which is expected to draw the pie based on the selection in the slicer so if OptionA is selected then COLA should be used to populate the pie. If OptionB is selected then COLB should be used to populate the pie and similarly OptionC is selected the pie should be populated using COLC.

 

I could write a DAX function to detected the currently selectedValue from the drop down.

I tried writing a new column based on formula which uses a simple SWITCH on the SelectedValue measure and it always turning out to be blank. I used same selectedValue to print on a card visual and it shows OptionA very correctly.

 

Any idea what's happening ?

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Sounds like you need to use the disconnected table trick:

https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Super User
Super User

Sounds like you need to use the disconnected table trick:

https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.