Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
i have problem in my 2 columns an [area] and [count of companies] in that area.. I put them together in a table, then I added distinct to [count of companies]. Then this happened. the total of the column is correct but the displayed contents of each row of [company] when added manually it doesn't match with the total .. it is usually higher.
I would like to get the distinct values of each row when added up that matches with the total of distinct count and would like to make clear the total is correct but the total of each row values when added up will not match the total. I would like to match the row values to the total of distinct [count of company]
Can I ask for your kind guidance about this. Thank you.
my columns are
[company] [sales] [area]
Solved! Go to Solution.
@Ahmedx Thanks for the reply, I think I somehow get your point here.. but in DirectQuery Countrow wont push through.. not available to directquery.. is there somehow other approach for that? Thanks.
DirectQuery is a complicated thing
Yea, this is for a dynamics 365 field service live dashboard
x
Hi @Zael-Leonhart this is a table of results...
Please share a row data to work with..
Company | Sales | Area |
A | 100 | AREA 2 |
A | 200 | AREA 3 |
C | 400 | AREA 4 |
B | 100 | AREA 4 |
B | 200 | AREA 4 |
B | 400 | AREA 2 |
H | 100 | AREA 4 |
I | 200 | AREA 4 |
J | 400 | AREA 2
|
@Ritaf1983 the count of company values per row must display the total 6.. not the total 8.. is it possible? thanks in advance..
Create a measure with dax :
If this post helps, then please consider Accepting it as the solution to help the other
members find it more quickly
@Ritaf1983
as you can see the rows value the sum is not 5.. the expected output is somehow like this..
Area | company_q | Must be | |
AREA 2 | 2 | 1 | |
AREA 3 | 1 | 0 | |
AREA 4 | 4 | 4 | |
Total | 5 | 5 |
@Zael-Leonhart Again how do you want area 2 to be 1, if there are 2 companies in this area?
A and B
@Ritaf1983 oh sorry my bad.. here is my data again
then I've done this
output of distinctcount
but my desired output is this
is this possible? thank you
from your data.. as you can see if you total the values of the row.. is not 5. If possible the values of the rows will equal to the total 5 not 7.. is there any way? thanks
Row calculates distinct values that are filtered by the specific area...
If you want something else please explain what logic you need.
Because your data has the same company in more than 1 area...
@Ritaf1983 Thanks for the reply, hmm the logic.. distinct vs unique.. the logic I want to point is the unique.. I hope you understand what I mean..
Company Sales Area
A 100 AREA 2 - counted
A 200 AREA 3 - not counted A is already at Area 2
C 400 AREA 4 - counted
B 100 AREA 4 - counted
B 200 AREA 4 - not counted B duplicate
B 400 AREA 2 - not counted have already B
H 100 AREA 4 - counted unique
I 200 AREA 4 - counted unique
J 400 AREA 2 - counted unique
I don't know if this will help.. if you are familiar with Qlik... i used the expression
sum(aggr(count(distinct [Company]),[Company])). I hope this helps. Thanks
Hi @Zael-Leonhart
You can rank the company by area and count the first appearances of every company.
Pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other
members find it more quickly
it looks like were gettting close to it..
Company Sales Area
A 100 AREA 2 - counted
A 200 AREA 3 - not counted A is already at Area 2
C 400 AREA 4 - counted
B 100 AREA 4 - counted
B 200 AREA 4 - not counted B duplicate
B 400 AREA 2 - not counted have already B
H 100 AREA 4 - counted unique
I 200 AREA 4 - counted unique
J 400 AREA 2 - counted unique
and the desired output is this
@Ahmedx Sorry for the trouble, I'm having issues with the earlier function when I put the company it tells me that incorrect parameter.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
87 | |
84 | |
66 | |
49 |
User | Count |
---|---|
127 | |
109 | |
93 | |
70 | |
67 |