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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
cocoloco79
Helper III
Helper III

Parameter * value based on IF function

Hi

 

I'm looking for a solution that lets me create a measure linked to a parameter If Qty Invoiced in "0".

Measure= If qtyinvoiced "0"; Qty Sent * Parameter

Is this possible?

Thank you in advance!!!!

 

parameter.PNG

 

3 ACCEPTED SOLUTIONS
PhilipTreacy
Super User
Super User

Hi @cocoloco79 

So if Qty Invoiced is 0 the result is Qty Sent * Parameter?

Try this

 

Measure = IF(MAX('Query1'[Qty Invoiced]) = 0 ,  MAX('Query1'[Qty Sent]) * Parameter)

 

Regards

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

cocoloco79
Helper III
Helper III

Hi Phil, thank you very much! Your formula works but only if I select one single product.

I changed the formula to this: 

Measure 2 = If(SUM( Invoiced[Qty Invoiced]) =0 , SUM(Invoiced[Qty Sent])*Parameter)
Just so it would it would sum up total qty sent and multiply that value time the parameter.
This however results in (Blank) output. Any idea what I'm doing wrong?Capture.PNG

View solution in original post

v-alq-msft
Community Support
Community Support

Hi, @cocoloco79 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

g1.png

 

You may create a what-if parameter as below.

g2.png

 

Then you may create the following measure.

Result = 
IF(
    MAX('Table'[Qty invoiced])=0,
    SELECTEDVALUE(Parameter[Parameter])*SUM('Table'[Qty sent])
)

 

Finally you may use parameter to filter the result.

g3.pngg4.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @cocoloco79 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

g1.png

 

You may create a what-if parameter as below.

g2.png

 

Then you may create the following measure.

Result = 
IF(
    MAX('Table'[Qty invoiced])=0,
    SELECTEDVALUE(Parameter[Parameter])*SUM('Table'[Qty sent])
)

 

Finally you may use parameter to filter the result.

g3.pngg4.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

cocoloco79
Helper III
Helper III

Hi Phil, thank you very much! Your formula works but only if I select one single product.

I changed the formula to this: 

Measure 2 = If(SUM( Invoiced[Qty Invoiced]) =0 , SUM(Invoiced[Qty Sent])*Parameter)
Just so it would it would sum up total qty sent and multiply that value time the parameter.
This however results in (Blank) output. Any idea what I'm doing wrong?Capture.PNG
PhilipTreacy
Super User
Super User

Hi @cocoloco79 

So if Qty Invoiced is 0 the result is Qty Sent * Parameter?

Try this

 

Measure = IF(MAX('Query1'[Qty Invoiced]) = 0 ,  MAX('Query1'[Qty Sent]) * Parameter)

 

Regards

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.