Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
WinterGarden
Helper III
Helper III

Multiple rows are showing instead of displaying the score in one row for each accounts

Hi ,
I am displaying few columns from different tables in a table visual in pbi, refer below screenshot.

WinterGarden_0-1732618573829.png


I need to calculate the score of each account based on "GTER Penetration" values..
when i tried to add that column, while calculating the score for gter penetration multiple rows are getting added for each account ie. it is automatically populating all the sector,area, region values in the table, which results in duplicate rows..

WinterGarden_2-1732609396101.png


i am using columns from multiple tables
1) FiscalYear,FiscalYear-Month,UDN,Account : from "Disclaimer" table
2) Sector : from "Sector" table
3) Area,Region : from "Area-Region" table
3) GTER : is from "GTER_Data" table
4) GTER Penetration: from "Alliance_Data" table

Relationships are created in the below order:
GTER_Data(Customkey eg: 3M CompanyFY24Q2) --------Disclaimer(customkey) :(many to one, single)
GTER_Data(SectorDesc)------Sector(SectorDesc) :(many to one, single)
GTER_Data(AreaRegion)------Area-Region(AreaRegion) :(many to many, single(Area-Region filters GTER_Data) )
Alliance_Data(Customkey eg: 3M CompanyFY24Q2) ------Disclaimer(customkey) :(One to One, both)

My query is:
1) since there is no direct relationship between Disclaimer  and Sector ,  Disclaimer  and Area-Region, how the sector , area, region values are displaying correctly in the table like in screenshot 1?
2) how to calculate the score value for each accounts without getting duplicate/unwanted rows..

score value is claculated based on each range GTER Penetration falls under..

2 REPLIES 2
Anonymous
Not applicable

Hi @WinterGarden ,

I create five tables as you mentioned.

vyilongmsft_0-1732673811561.png

I also make some relationships.

vyilongmsft_1-1732673939711.png

Then I think you can create a calculated column and here is the DAX code.

GTER Penetration Score = 
SWITCH(
    TRUE(),
    'Alliance_Data'[GTER Penetration] < 0.2, 1,
    'Alliance_Data'[GTER Penetration] < 0.4, 2,
    'Alliance_Data'[GTER Penetration] < 0.6, 3,
    'Alliance_Data'[GTER Penetration] < 0.8, 4,
    'Alliance_Data'[GTER Penetration] <= 1, 5,
    BLANK()
)

vyilongmsft_2-1732674067427.png

You can also create a measure and then you can get what you want.

Total Score = 
SUMX(
    VALUES('Disclaimer'[Account]),
    CALCULATE(
        MAX('Alliance_Data'[GTER Penetration Score])
    )
)

vyilongmsft_3-1732674408009.png

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous ,

Thank you for taking your time to help resolve this issue. Much appreciated.
This is the issue i am facing..
if i add those main columns into a table this is how it looks like:

WinterGarden_2-1732689684238.png

 

in this visual you can see, single row is created for both accounts A1 , A2
where as if i add that total score measure, duplicate rows are created

WinterGarden_4-1732690609794.png

UDN,Account : from disclaimer
SectorDesc : from sector
Area, Region : from Area-Region
GTER: from GTER_Data
GTER Penetration,total score : from Alliance_Data

my desired output is:

UDNAccountSectorDescAreaRegionGTERGTER PenetrationTotal Score
U1A1Sector1Area1Region10.50.53
U2A2Sector2Area2Region20.70.74


do you know how i can achieve that?

to resolve this issue i tried to create relationship between Alliance_Data and Sector, Alliance_Data and Area-Region tables same as GTER_Data table, after adding the sector and arearegion columns in Alliance_Data table like in the below screenshot:

WinterGarden_2-1732792257816.png

but it is causing ambiguity issue:

WinterGarden_3-1732792305119.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.