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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

How to add vertically (column) data from a distinct count

How about experts:

I need your help, I have a measure that brings me the results of a table to which I apply the distinct count, what I need to do is add these distinct counts but not horizontally, which I already achieved, if not vertically , Is it possible to do this? If someone knows how to do it, could you please help me?

because with the option of subtotals of power bi it does not make me the sum.

 

DeroMA_0-1663631127092.png

 

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous,

I'm not so clear about your requirement, can you please share some more detail with the expected results?

How to Get Your Question Answered Quickly  

If you mean to expand these results on the column, you can try to create a matrix and use the category fields on column fields to show them horizontally.

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Ok, I'll try to explain it in a better way:

As I said before, in a table I have several records equal to which, previously I applied (DISTINCT COUNT) to include those records in a single 1, I do this based on a date, example: in one day there were 4 records of the same record, I take the date of that day and include it in 1 record, well so far so good, what I need is to add these results.

For example, they would be 1 + 1 = 2. According to me, putting the (row subtotals) option would give me this result at the end of each column, but as you can see in the image, it is only adding the HrsLab column (which is a measure) but the ZUM column (which is also a measure) which contains the distinct count does not summarize it for me, it only passes me the 1 up to the subtotal, in short I am looking to add each column vertically, it does not matter if without measures, calculated columns, etc.

This is the measure I use to fetch the distinct counts:

Measure = CALCULATE(DISTINCTCOUNT(TABLE[COLUMN]))

amitchandak
Super User
Super User

@Anonymous , Not vary clear. Assume you are display data group by column 1 and taking distinct of column 2 

 

sumx(Values(Table[Column1]), calculate(Distinctcount(Table[Column 2])) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Ok, I'll try to explain it in a better way:

As I said before, in a table I have several records equal to which, previously I applied (DISTINCT COUNT) to include those records in a single 1, I do this based on a date, example: in one day there were 4 records of the same record, I take the date of that day and include it in 1 record, well so far so good, what I need is to add these results.

For example, they would be 1 + 1 = 2. According to me, putting the (row subtotals) option would give me this result at the end of each column, but as you can see in the image, it is only adding the HrsLab column (which is a measure) but the ZUM column (which is also a measure) which contains the distinct count does not summarize it for me, it only passes me the 1 up to the subtotal, in short I am looking to add each column vertically, it does not matter if without measures, calculated columns, etc.

This is the measure I use to fetch the distinct counts:

Measure = CALCULATE(DISTINCTCOUNT(TABLE[COLUMN]))

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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