Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
There are two tables from two data sources:
Table1(Field1, Field2, Field3, Field4, Field5, Field7)
Table2(Field1, Field2, Field3, Field7)
Next I collect agregate table "agregate_table" as:
select t1.Field1, t1.Field2, t1.Field3, t1.Field4, t1.Field5, t2.cnt as cnt_all, t1.cnt
from (select Field1, Field2, Field3, Field4, Field5, count(distinct Field7) as cnt
from Table1
group by Field1, Field2, Field3, Field4, Field5) as t1
left join (select Field1, Field2, Field3, count(distinct Field7) as cnt
from Table2
group by Field1, Field2, Field3) as t2 on t2.Field1 = t1.Field1 and t2.Field2 = t1.Field2 and t2.Field3 = t1.Field3
how to implement it in DAX?
Hi @wvadik ,
You can use 'Merge Queries' to combine the two tables first.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Provide sample data and expected outcome.
Note that both ALL() and VALUES() give you distinct collections. As does SUMMARIZE()
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |