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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

Total Sum with Different Columns In Direct Query

Hello, 

 

I'm having trouble performing dax formula to give me the total spend for each table (asianamerican,diverse,africanamerican,wbe,divattributes) with the total coming from the fiscspend table with a relationship by the tax id. The Facts table (fiscspnd) is a direct query connection. 

 

1st Question For example, I'm looking to do Total Asian American Spend = Sum or Calculate? Asian Table [ethnicity] = "Asian Amerian"? I also tried to do related with no success. 

 

2nd Question :After having Total Asian American Spend I want to know the % of the Total Spend (this dax formula works)

 

Would just a simple % of Spend =total asianamerican spend / total spend? 

 

himiehendrix_0-1662069945077.png

 

Thank you for your guidance! 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

In fact, the screenshot does not help us clarify your data structure. Can you please share some more detail about these?

How to Get Your Question Answered Quickly  

You can also try to use the following measure formula if helps:

Total Asian American Spend =
CALCULATE (
    SUM ( Fiscspend[Sales] ),
    ALLSELECTED ( Fiscspend ),
    AsianAmerian[ethnicity] = "Asian Amerian"
)

% of Spend =
[Total Asian American Spend]
    / CALCULATE ( SUM ( Fiscspend[Sales] ), ALLSELECTED ( Fiscspend ) )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

In fact, the screenshot does not help us clarify your data structure. Can you please share some more detail about these?

How to Get Your Question Answered Quickly  

You can also try to use the following measure formula if helps:

Total Asian American Spend =
CALCULATE (
    SUM ( Fiscspend[Sales] ),
    ALLSELECTED ( Fiscspend ),
    AsianAmerian[ethnicity] = "Asian Amerian"
)

% of Spend =
[Total Asian American Spend]
    / CALCULATE ( SUM ( Fiscspend[Sales] ), ALLSELECTED ( Fiscspend ) )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Top Solution Authors