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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mossy83
Frequent Visitor

Count Distinct Values based on multiples columns

Hello Power Bi Community ! 

I am quite new to this software and am excited to learn.

 

I faced a problem which I can't resolve :

I have a different numbers for each months of a project and I would like to created a column which counts each iteration of a value of multiples columns. I'm bad as explaining so here is what I would like in image for the first columns

 Capture.PNG
This column would count the number of "1" in each columns/months.
Capture1.PNG
And this one would count the number of values different than "null" in each columns/months (of course the proposal is wrong Smiley Very Happy ).

 

The final goal is to create a graph showing two lines of this two values for each months, that's why I need them in columns.

 

Thanks in advance for anyone who try to help me 🙂 

 

Have a good day

Mossy

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @mossy83 

 

Please see the attached file with solution included, all you need to do is Unpivot your data columns and create two measures.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

5 REPLIES 5
Mariusz
Community Champion
Community Champion

Hi @mossy83 

 

Can you create a sample of a current start of your data and one with the desired outcome?

 

Best Regards,
Mariusz

Please feel free to connect with me.
Mariusz Repczynski

 

I don't know how could I upload a file, but here is a link to download the final file I would like to have on BI :
https://wetransfer.com/downloads/8ee3bf2d6e8b7baf2c940c16efe23be820190918111405/f1ba7434d978edfdc8ff...

 

Thanks a lot in advance,

Mossy

Mariusz
Community Champion
Community Champion

Hi @mossy83 

 

Please see the attached file with solution included, all you need to do is Unpivot your data columns and create two measures.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

Never heard of this option. Perfectly works

 

Thanks a lot for your solution 🙂

 

Mossy

Mariusz
Community Champion
Community Champion

@mossy83, no problem happy to help!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.