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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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