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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Relative Total

Hi everyone, I want to get a % of a relative total of a category. Things work fine until total since I would like the last column to be 100% and I like to see Relative total to be 17,580,000 in the "total" row. 

 

cod_cliente is from Codigo_sico_sap table

COD.ALMACEN es from Base_Legal_Conductor table

Value is from Foperau table 

 - Relative Total = CALCULATE([value],ALLEXCEPT(Base_Legal_Condunctor,Base_Legal_Condunctor[COD. CLIENTE]),ALLEXCEPT(Codigo_Sico_Sap,Codigo_Sico_Sap[cod_sico]))

- Value = SUM(Foperau[saldo_usd])

 

DataScientistR_3-1619740454436.png

 

 

DataScientistR_2-1619740178078.png

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

 

I'll give you a quick hint that might save your bacon one day 🙂 Please do not create models with 1-to-1 relationships between tables. Such tables are in fact one and the same table and data from them should be consolidated into a single table. If you do consolidate data, your model will suddenly become much simpler and easier to code against.

 

This measure could do what you want:

 

[measure] =
CALCULATE(
    [Value],
    ALLSELECTED( Base_Legal_Condunctor )
)

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous 

 

I'll give you a quick hint that might save your bacon one day 🙂 Please do not create models with 1-to-1 relationships between tables. Such tables are in fact one and the same table and data from them should be consolidated into a single table. If you do consolidate data, your model will suddenly become much simpler and easier to code against.

 

This measure could do what you want:

 

[measure] =
CALCULATE(
    [Value],
    ALLSELECTED( Base_Legal_Condunctor )
)
Greg_Deckler
Super User
Super User

@Anonymous 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



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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