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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
jonnyA
Responsive Resident
Responsive Resident

Formula for DistinctCount Voucher where Payment is greater or less than 0

Hello,

 

Hoping someone could help me create the following formula where ...

 

DistinctCount Voucher where Payment is greater or less than 0

 

Thank you!

1 ACCEPTED SOLUTION

Can you try removing the "FILTER (" and just add one ")" at the end?

 

Sorry, on phone and syntax may be wrong on my part! Apologies. 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

3 REPLIES 3
jonnyA
Responsive Resident
Responsive Resident

@TheoC 

Power BI not liking the formula where I highlighted.  Any ideas on how to fix?

jonnyA_2-1643118240280.png

 

 

 

jonnyA_0-1643118175920.png

 

 

Can you try removing the "FILTER (" and just add one ")" at the end?

 

Sorry, on phone and syntax may be wrong on my part! Apologies. 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

TheoC
Super User
Super User

Hi @jonnyA, can you try something like the following?

 

Measure = 

VAR _1 = DISTINCTCOUNT ( Table[Voucher] )

VAR _2 = CALCULATE ( _1 , FILTER ( Table[Payment] <> 0 ) )

RETURN 

_2

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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