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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
joaquinel
Helper I
Helper I

Count unique values

hi, 

I should need to count how many IdMember I have when the Account is 70810030 and there is no a movement with the Account 70510230 with the same CodPago.

 

In the table below it should count only the movements in black (6 movements).

 

Everything is in the same table. I need to use DAX, not to create another table, because my DDBB is so big.

 

Thanks

 

IdMemberAccountCodPagoImporte
34094170510230657097813,99
336324708100306571176-59,99
591715708100306571404-59,99
341593708100306571751-56,52
349251708100306572379-56,52
32976970510230664950413,99
349190708100306653518-94,90
34919070510230665351894,90
634287708100306685785-49,99
63428770510230668578549,99
632611708100306685787-49,99
1 ACCEPTED SOLUTION
olgad
Super User
Super User

hi, 

Column = Calculate(CountRows(Table),ALLEXCEPT(Table, Table[CodPago]))
Measure= 
Calculate(Count(Table[Columnfromabove]), Table[Columnfromabove]=1)
or if you specifically need that account then 
 Measure= Calculate(Count(Table[Columnfromabove]), Table[Columnfromabove]=1 &&TableAccount="70510230 ")

DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

View solution in original post

2 REPLIES 2
joaquinel
Helper I
Helper I

I wanted use DAX, but, definitely, this is the solution. thanks a lot @olgad   it has worked.

olgad
Super User
Super User

hi, 

Column = Calculate(CountRows(Table),ALLEXCEPT(Table, Table[CodPago]))
Measure= 
Calculate(Count(Table[Columnfromabove]), Table[Columnfromabove]=1)
or if you specifically need that account then 
 Measure= Calculate(Count(Table[Columnfromabove]), Table[Columnfromabove]=1 &&TableAccount="70510230 ")

DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.