The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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.
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
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]))
@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])) )
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]))
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
72 | |
48 | |
46 |