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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
meena16_vibrant
Frequent Visitor

DAX Help

HI,

a,b,c,d values are presented in same matrix format as below. I want to write a DAX measure for Formula1 and Final Formula. Can you pls let me know how to achieve it in DAX?

 

meena16_vibrant_2-1674800411519.png

 

 

1 ACCEPTED SOLUTION

when you put this measure in you matrix, the grand total will give the result of (B2*D2)+(B6*D6) 

View solution in original post

3 REPLIES 3
wdx223_Daniel
Super User
Super User

say, the field of "Test1","Test2" is F1, and F2 is the field of a,b,c,d

NewMeasure =
IF (
    ISFILTERED ( Table[F1] ),
    IF (
        ISFILTERED ( Table[F2] ),
        BLANK (),
        DIVIDE (
            SUMX ( VALUES ( Table[F2] ), [Val1] * [Val2] ),
            SUMX ( VALUES ( Table[F2] ), [Val1] )
        )
    ),
    SUMX ( SUMMARIZE ( Table, Table[F1], Table[F2] ), [Val1] * [Val2] )
)

Thank you so much @wdx223_Daniel .   Can you please help to get DAX for final formula?

(B2*D2)+(B6*D6) .

B2 - sum of value (a +b) and  D2= value which I get from formula1.

B6 -sum of value(c+d) and D6 = value which I get from formula1. I have to show it in card visual.

when you put this measure in you matrix, the grand total will give the result of (B2*D2)+(B6*D6) 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors