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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.