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
BarSi1986
Helper I
Helper I

What if parameter in DAX

Dear All,
i want my "what if parameter" to affect only certain row in table - if the condidion is met (screen below), for example:


when i will hard code value of 20 inside DAX calculation it's working fine - there is 50 bikes in last column, but when im changing it to Extra bikes parameter value - nothing is happening, it doesn't see param value ....what am i doing wrong here ? 

BarSi1986_0-1637236252199.png

 

1 ACCEPTED SOLUTION
BarSi1986
Helper I
Helper I

ok, i think i got this one ! switch statement with default parameter solved the problem of wrong totals 

BarSi1986_0-1637322874189.png

 

View solution in original post

3 REPLIES 3
BarSi1986
Helper I
Helper I

ok, i think i got this one ! switch statement with default parameter solved the problem of wrong totals 

BarSi1986_0-1637322874189.png

 

VahidDM
Super User
Super User

HI @BarSi1986 

 

Try this measure:

Measure = 
Var _A =[Extra bikes Value]
return
if(max(Items[Item])="bikes",sum(Items[Quantity])-'Extra bikes'[Extra bikes Value],sum(Items[Quantity]))

 

Output:

 

VahidDM_0-1637237480247.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Well, it fixed problem on row level here, but still doesn't affect TOTAL - we have 10+20 items, and the total of column is still 50, any ideas ? cause im still new in DAX 😞 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Users online (443)