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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
jmcph
Helper III
Helper III

DAX filter problems

Hi, I hope you can help me with my little problem.

 

I have this table. 

 

Book                 Reference #                 Code                   Date                   Amt
Eco                       Ref01                         101                   1/1/2020           1,000

Pro                       Ref01                         101                  2/5/2020           1,000

Eco                       Ref02                         101                  2/1/2020           2,000

Eco                       Ref02                         101                   2/3/2020           2,000

 

My measure are as follows : 

EcoAmt = Sumx ( Table , if( Book = "Eco", Table[Amt] , 0 )

ProAmt = Sumx ( Table , if( Book = "Pro", Table[Amt] , 0 )

 

What i expected my visual table would look like

 

Ref #         Code       EcoAmt           ProAmt

Ref101        101          1,000              1,000

 

However, this doesnt seem to be the case. Any ideas on how to fix this? 

Any inputs would be greatly appreciated. 

 

Thank you! 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@jmcph , This should work. what is the wrong you are getting? You should also get a row for Ref102.

 

try measure like

Sumx (filter(Table,[Book] = "Eco"), Table[Amt])
Sumx (filter(Table,[Book] = "Pro"), Table[Amt])

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

View solution in original post

v-alq-msft
Community Support
Community Support

Hi, @jmcph 

 

You may create measures as below. The pbix file is attached in the end.

 

EcoAmt = 
CALCULATE(
    SUM('Table'[Amt]),
    FILTER(
        'Table',
        [Book]="Eco"
    )
) 
ProAmt = 
CALCULATE(
    SUM('Table'[Amt]),
    FILTER(
        'Table',
        [Book]="Pro"
    )
) 

 

 

Result:

f1.png

 

Best Regards

Allan

 

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

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @jmcph 

 

You may create measures as below. The pbix file is attached in the end.

 

EcoAmt = 
CALCULATE(
    SUM('Table'[Amt]),
    FILTER(
        'Table',
        [Book]="Eco"
    )
) 
ProAmt = 
CALCULATE(
    SUM('Table'[Amt]),
    FILTER(
        'Table',
        [Book]="Pro"
    )
) 

 

 

Result:

f1.png

 

Best Regards

Allan

 

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

@jmcph , This should work. what is the wrong you are getting? You should also get a row for Ref102.

 

try measure like

Sumx (filter(Table,[Book] = "Eco"), Table[Amt])
Sumx (filter(Table,[Book] = "Pro"), Table[Amt])

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.