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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
azaterol
Helper V
Helper V

Matrix correct dax solution

Hey all,

 

in my matrix I have a measure for "August" which is :

For 4300:

August = calculate(SUM(DOK[salary1]),filter(DOK, DOK[DokDate]>=date(2022,08,01) && DOK[DokDate]<=date(2022,08,30)))

 As you can see I have in my Matrix row the SaNr and in my Matrix value the August measure.

 
For 4400 I want the measure calculate with salary2, like this:
August = calculate(SUM(DOK[salary2]),filter(DOK, DOK[DokDate]>=date(2022,08,01) && DOK[DokDate]<=date(2022,08,30)))
 
But as you know, I only can use one measure for an value

 

As you can see I have in my Matrix row the SaNr and in my Matrix value the August measure.

 

 

saaa.PNG

 xxx.PNG

 

 

 

 

 

 

The Result calculates for both SaNr(4300 and 4400) with salary1, but 4400 shoul calculate with salary2. How can I do this?

sum.PNG

 

Thank you for help

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @azaterol 

Thanks for reaching out to us.

I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.

If you need more help, please let me know.

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

tamerj1
Community Champion
Community Champion

Hi @azaterol 

please try

August =
IF (
    SELECTEDVALUE ( DOK[SaNr] ) = "4300",
    CALCULATE (
        SUM ( DOK[salary1] ),
        FILTER (
            DOK,
            DOK[DokDate] >= DATE ( 2022, 08, 01 )
                && DOK[DokDate] <= DATE ( 2022, 08, 30 )
        )
    ),
    CALCULATE (
        SUM ( DOK[salary2] ),
        FILTER (
            DOK,
            DOK[DokDate] >= DATE ( 2022, 08, 01 )
                && DOK[DokDate] <= DATE ( 2022, 08, 30 )
        )
    )
)
calerof
Impactful Individual
Impactful Individual

Hi @azaterol ,

I'd be happy to help if you provide sample data please.

Fernando

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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