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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
icturion
Resolver II
Resolver II

Distinc count by record values

Hi,

hope someone can help me with the following:
Based on the table below, I want to calculate how often a certain combination occurs per unique MO_Monsternummer value?

tabel.JPG

concerns the combinations based on column "Categorie coli":

  • 1 and 2
  • 1 and 4
  • 3 and 2
  • 3 and 4

The result i'm looking for is this:

result.JPG

regards 

ICTURION

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

A trickier solution to your tricky question,

Screenshot 2021-11-18 220124.png

Screenshot 2021-11-18 220226.png


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!

View solution in original post

5 REPLIES 5
CNENFRNL
Community Champion
Community Champion

A trickier solution to your tricky question,

Screenshot 2021-11-18 220124.png

Screenshot 2021-11-18 220226.png


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!

Hi CNENFRNL,

 

Is it also possible to calculate the numbers per category in a separate measure? I also want to be able to calculate with the different results per category. For example by dividing the number of category "1 and 2" by the number of category "1 and 4". so 2/5 = 0.4

thank you. I didn't realize the solution was so tricky

smpa01
Super User
Super User

@icturion  can you please provide sample data in a table format?

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

MO_MonsternummerCategorie coli
1231
1232
2341
2344
3453
3452
4561
4564
5671
5674
6781
6784
7891
7894
7893
7892

Hi SMPA01, her is the sample data in a table format. Thank you

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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