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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
dkernen
Resolver II
Resolver II

Add selected constant from slicer to table

I need some help.  I work with medical data.  I have created a _ChooseOrgan table to select the appropriate Organ (Column=OrganChoices) (Heart, Lung, Kidney, etc).  Then I created a measure for the choice selected

SelectedOrgan = SELECTEDVALUE(_ChooseOrgan[OrganChoices])

 

We are in the process of restructuring our data.  But currently, I have a very wide table with separate columns for each organ and its respective data/metrics (Kidney Date, Kidney Value, Heart Date, Heart Value, etc).  What I want to do is pass the SelectedOrgan choice (a single value from the slicer) to the data table in a new column as a constant.  Then, I could create new columns in my data table based on a switch statement like this example

SelectedIntent = SWITCH(True(),
[Selected Organ]="Heart",v_Organ[HeartOrIntent],
[Selected Organ]="Liver",v_Organ[LiverOrIntent],
[Selected Organ]="Intestine",v_Organ[IntestineOrIntent],
BLANK())

 

But I cannot get the slicer choice in the data table.  Please, please give me a helpful tip!

2 ACCEPTED SOLUTIONS
Icey
Community Support
Community Support

Hi @dkernen ,

 

It is suggested to use "UnPivot" to restructure your data. Please check this video and the attached PBIX file.

The final data structure:

organ.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Icey
Community Support
Community Support

Hi @dkernen ,

 

Is this problem solved?


If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.


If not, please let me know.

 


Best Regards,
Icey

View solution in original post

3 REPLIES 3
Icey
Community Support
Community Support

Hi @dkernen ,

 

Is this problem solved?


If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.


If not, please let me know.

 


Best Regards,
Icey

Icey
Community Support
Community Support

Hi @dkernen ,

 

It is suggested to use "UnPivot" to restructure your data. Please check this video and the attached PBIX file.

The final data structure:

organ.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

th3h0bb5
Resolver II
Resolver II

The issue is that Calculated Columns update their values at the moment of their creation and then do not check for changes to the data until the dataset refreshes. In your example, your SWITCH() based column would look at the current selection and populate the results. If you then selected something else, it would ignore your change until the dataset refreshed.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors