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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Gauteweb
Advocate II
Advocate II

What-if and measure coloum

Hi. So I'm struggling a bit with this:

We have a product that we sell with a package price per 100.000 items, so I have these coloums in a table:

Items
- just plain values
Packages(ROUNDUP(('Table'[Items] / 100000),0)

 

I then created a what-if with prices from 1 to 50 in a new Coloum called Cost and added a following coloum:

 

Price
var _sel = SELECTEDVALUE('Cost'[Item Cost])
return
(ROUNDUP(('Table'[Items] / 100000),0) * _sel)

The problem now is that the Price only uses the default value I put in the What-if. If I create a What-if without a default value, the Price coloum is always empty.


I've tried many different approaches to the problem, but no matter what I do, the measure coloum Price always uses the default what-if value, now the value the user selects.

 

1 ACCEPTED SOLUTION

@Gauteweb, Try the below DAX in a measure,

Euro_M = SUM(AgentMethodUsage[Packages]) * 'Price'[Price Value]

View solution in original post

5 REPLIES 5
Gauteweb
Advocate II
Advocate II

Here is the PBIX file (didn't find any way to upload it to the community)

https://www.jottacloud.com/s/02319ee04087c4248d38a345ad60f902580 

@Gauteweb, Try the below DAX in a measure,

Euro_M = SUM(AgentMethodUsage[Packages]) * 'Price'[Price Value]

Thanks, that worked like a charm!

SivaMani
Resident Rockstar
Resident Rockstar

@Gauteweb,

 

Did you create a calculated Column or measure? Share the pbix file if possible.

Hi. Sorry, I ment Calculated Column. 

I need to clean up the pbix file before I can share it, to much sensitive info 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.