The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have implemented many to many using Bridge table. (TableA *<--1 Bridge 1<->* TableB).
Now i have dropped an attribute from TableB and
DISTINCTCOUNT(TableA[Column1])
into a table visual. I was not able to match the individual row sum with Total row at the bottom of the visual. I know why i was not able to match because each row in TableA might be get shared across two rows in TableB (which is a double count of the same row), when it comes to Total row it is counted as one since we are using DistinctCount. I could use
SUMX(VALUES(TableB[Column1]),DISTINCTCOUNT(TableA[Column1]))
but if we have 5 columns in TableB i should write this SUMX 5 times by replacing the column value in the VALUES function and also it's not going to work because while calculating the Total row we can not get to know which column is being used in the visual so that that particular column should be used in SUMX(VALUES())). I tried using this
CALCULATE(DISTINCTCOUNT(TABLEA[Column1]_,Bridge)
It doesn't work either.
Is there any way that i could overcome this issue ? Thanks in advance.
Solved! Go to Solution.
@Anonymous
You may add CALCULATE as follows.
Measure = SUMX ( VALUES ( 'Sales Program'[Sales Industry] ), CALCULATE ( DISTINCTCOUNT ( Pipeline[Dim_OpportunityId] ) ) )
Would need some sample data that recreates the issue. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Also, this looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Thanks for the reply. I have attached the sample data. Please take a look. In Sales Program table i have only one attribute incase of sample but in my real data I have almost 10 attributes which are having the same issue. Please download the sample pbix file from this link Sample Data
@Greg_Deckler Can you please take a look at this ? Thanks! I have attached the sample pbix file.
@Anonymous
You may add CALCULATE as follows.
Measure = SUMX ( VALUES ( 'Sales Program'[Sales Industry] ), CALCULATE ( DISTINCTCOUNT ( Pipeline[Dim_OpportunityId] ) ) )
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
110 | |
78 | |
77 | |
39 | |
36 |
User | Count |
---|---|
158 | |
111 | |
64 | |
59 | |
54 |