cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

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

 IdMember Account CodPago Importe 340941 70510230 6570978 13,99 336324 70810030 6571176 -59,99 591715 70810030 6571404 -59,99 341593 70810030 6571751 -56,52 349251 70810030 6572379 -56,52 329769 70510230 6649504 13,99 349190 70810030 6653518 -94,90 349190 70510230 6653518 94,90 634287 70810030 6685785 -49,99 634287 70510230 6685785 49,99 632611 70810030 6685787 -49,99
1 ACCEPTED SOLUTION
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 ")

PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
2 REPLIES 2
Helper I

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

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 ")

PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors