cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AliceW
Post Prodigy
Post Prodigy

Measure to display zero if the filter in the formula is unselected in the page

Hi folks,

Seems pretty simple, but I can't figure it out.

So, I have this measure.

Lost Opps =
calculate(
[Lost Opps],
Opp[Lost Reason] = "Duplicate"
)
In the report page, I have the filter 'Lost Reason'. I'd like the measure to display zero if 'Duplicate' is unselected in this filter.
How do I do that, please?
Thanks,
Alice
1 ACCEPTED SOLUTION

Hi Miguel,

I just ended up doing a new column, which solved my problem.

Thanks for your time!

View solution in original post

4 REPLIES 4
MFelix
Super User
Super User

Hi @AliceW ,

 

Try the following code:

Lost Opps =
COALESCE ( CALCULATE ( [Lost Opps], Opp[Lost Reason] = "Duplicate" ), 0 )

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks for replying, Miguel. Does not work, sorry...

Hi @AliceW ,

 

Can you please share a simple mockup file data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi Miguel,

I just ended up doing a new column, which solved my problem.

Thanks for your time!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.