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
HaiQuan
Regular Visitor

Dax command

I have two tables, and the PrimaryKey is Class. I need a dax to calculate the sum of now divided by the sum of max when there is a filter Quarter.

 

 

image.png

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @HaiQuan 
Please try

ResultMeasure =
CALCULATE (
    DIVIDE ( SUM ( Table1[now] ), SUM ( Table1[max] ) ),
    Table1[class] IN VALUES ( Table2[class] )
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @HaiQuan 
Please try

ResultMeasure =
CALCULATE (
    DIVIDE ( SUM ( Table1[now] ), SUM ( Table1[max] ) ),
    Table1[class] IN VALUES ( Table2[class] )
)

Thank you bro, it works, nb! 

Helpful resources

Announcements
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.