Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all
I have 2 tables linked by a column called Merged.3
The dax measure I created is returning me the total number of rows from the tablle 'All' (9), however it should return a value of 6 since I am choosing 2 of the 3 names as seen below:
The desired result should be 6 because Jose and Maria both have 3 rows each from the table called 'All':
Dax:
Non Duplicate Merged3 =
COUNTAX(
SUMMARIZE(
'All',
'All'[Merged.3]),
'All'[Merged.3]
)
I attach pbix: sample_merge_3.pbix
Can you please help me correct the dax to have the value of 6 when I choose Jose and Maria?
Thanks.
Solved! Go to Solution.
@o59393 Switch relationship direction to Both. Switch your relationship columns to Name (for both tables). Switch your relationship type fo Many-to-Many. Use a measure that just does COUNTROWS('All'). See PBIX file below signature. BTW, this model is kind of odd, probably better to create a dimension table for your names like DISTINCT('Actual'[Name]), create a 1:* between this table and your All and Actual tables and use this table in your slicer.
@o59393 Assuming that your slicer is based off of your All table, then it should just be:
COUNTROWS('All')
If it is not, then make sure that you have a relationship between your slicer table and your 'All' table and it still should be just COUNTROWS('All')
No, the slicer needs to come from the other table.,The 'All' table is just a master table.
Can you please have a look to the pbix?
Thanks.
@o59393 Switch your relationship direction to Both
@o59393 Switch relationship direction to Both. Switch your relationship columns to Name (for both tables). Switch your relationship type fo Many-to-Many. Use a measure that just does COUNTROWS('All'). See PBIX file below signature. BTW, this model is kind of odd, probably better to create a dimension table for your names like DISTINCT('Actual'[Name]), create a 1:* between this table and your All and Actual tables and use this table in your slicer.
User | Count |
---|---|
77 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
93 | |
50 | |
49 | |
46 |