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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ADRICHECKIN
Frequent Visitor

DISTINCT COUNTX for an EXPRESSION?

Hi team,

 

Can I get through an expresion de unique values after concatenate the 4 first columns ( Reservation, date, train, wagon ) ? 

 

Now I'm aplying a DISTINCOUNT to COMBINEVALUES ( columns )

 

RESERVATIONDATETRAINWAGONPAX COMBINEVALUES
1-10114/11/2020A11 1-10144149A1
1-10114/11/2020A12 1-10144149A1
1-10115/11/2020A11 1-10144150A1
1-10115/11/2020A12 1-10144150A1
1-10214/11/2020A11 1-10244149A1
1-10214/11/2020A12 1-10244149A1
1-10214/11/2020A13 1-10244149A1
1-10314/11/2020A11 1-10344149A1
1-10314/11/2020B21 1-10344149B2
1-10314/11/2020B31 1-10344149B3

 

Thank you,

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @ADRICHECKIN 

Try this measure in card visual

Measure =
COUNTROWS (
    SUMMARIZE (
        Table1,
        Table1[RESERVATION],
        Table1[DATE],
        Table1[TRAIN],
        Table1[WAGON]
    )
)

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

View solution in original post

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

Hi, @ADRICHECKIN , you can easily get the job done in Powe Query by adding a custom column

add.png

[RESERVATION] & Text.From(Number.From(Date.From([DATE],"fr"))) & [TRAIN] & Text.From([WAGON])

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

AlB
Super User
Super User

Hi @ADRICHECKIN 

Try this measure in card visual

Measure =
COUNTROWS (
    SUMMARIZE (
        Table1,
        Table1[RESERVATION],
        Table1[DATE],
        Table1[TRAIN],
        Table1[WAGON]
    )
)

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.