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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AliceW
Impactful Individual
Impactful Individual

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
AliceW
Impactful Individual
Impactful Individual

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



AliceW
Impactful Individual
Impactful Individual

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



AliceW
Impactful Individual
Impactful Individual

Hi Miguel,

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

Thanks for your time!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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