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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

total value for each category

Hi All,

 

my dax doesn't go as expected when i dorill up.

 

dax =
DIVIDE(
sum(table1[Value1])
, sum(table2[Value2])
)

ss_ss_0-1641363207886.png

 

 

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

Hi @Anonymous ,

 

Please try the following formula:

 

Measure = 
SUMX ( 
    SUMMARIZE ( 
        Table1, 
        dim1[name], 
        dim2[name], 
        "SubValue", [dax] 
    ),
    [SubValue]
)

vkkfmsft_0-1641783033033.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

9 REPLIES 9
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try the following formula:

 

Measure = 
SUMX ( 
    SUMMARIZE ( 
        Table1, 
        dim1[name], 
        dim2[name], 
        "SubValue", [dax] 
    ),
    [SubValue]
)

vkkfmsft_0-1641783033033.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Anonymous , seem like you need some of Avg

 

Sumx(summarize(Table, Table[Category], Table[Sub Category], "_1", dax =
DIVIDE(
sum(table1[Value1])
, sum(table2[Value2])
) ), [_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks for the help !!

 

But your dax is not work.

@Anonymous , If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@Anonymous We can not access your app. Paste data here from excel or Power BI

or share them on onedrive or dropbox

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

sample.PNGTable1

key1key2key3value

0010111011
0020121022
0030131033
0040141044
0050151055
00101210210
00101310440

 

table2

key1key2value

00101110
00101220
00101330
00201440
00201260

 

dim1

key name

001aaa
002bbb
003ccc
004ddd
005eee

 

dim2

key name

011AAA
012BBB
013CCC
014DDD
015EEE

 

dim3

key name

101A
102B
103C
104D
105E

@Anonymous , which one is category and sub category used in the first excel screenshot

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

category is dim1[name].

sub category is dim2[name].

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.