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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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