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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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