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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Ssibbett
Frequent Visitor

DAX Selectvalue() does not work with Dynamic Calculation Columns

Hello, 

I'm new to power BI. 

I have created table "Units" that has two choices (below). This is used in a Slicer. 

Selected UnitsChoice
Acre-Feet1
Million Galons2

I have a measure with formula: Units Value = LOOKUPVALUE(Units[Choice],Units[Select Units], SELECTEDVALUE(Units[Select Units],"Million Gallons"))

The information for the measure displays correctly on the Card. 

I have another table "Volumes" with volumes and various units for volumes. I want to allow the user to choose one unit type from "Units" table for the report display. I added a New Column to the "Volumes" table with the formula: 

Volumn UOM = SWITCH(Units[Units Value],1,[To AF]*[Volume],2,[To MG]*[Volume],0).
The report will result in the alternative "Million Gallons" dispite changes to the slicer. The Card does change values with the slicer. If I change SELECTEDVALUE(Units[Select Units],"Acre-Feet") then the report will be in "Acre-Feet". 
 
I have also tried using parameter for the same purpose but the results are the same. I have also tried using the formula: Units Value =  LOOKUPVALUE(Units[Choice],Units[Select Units], IF(HASONEVALUE(Units[Select Units]),VALUES(Units[Select Units]))), but that does not work. 
 
I believe this should work because there are some article that say so, https://spr.com/powerbi-dynamic-calculations/ 
 

 

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Columns are not dynamic, they are calculated at data load so they cannot change when you change a slicer. You need a measure.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

If I put the column formula in a measure, the measure will not calculate values for each row. 

Here is my column formula Volumn UOM = SWITCH(Units[Units Value],1,[To AF]*[Volume],2,[To MG]*[Volume],0).  How do I make this into a measure? 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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