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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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