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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Nfuentes86
Frequent Visitor

Power Bi Total Column Excluding Discipline Names

power bi progrress.png

I need to exclude Indirect and Change Orders from total column for  Sv,Cv,and Pf. 

Ive tried using this Dax Measure and keeps giving me errors : 

TotalExcludingIndirectsAndChangeOrders =
CALCULATE(
    SUM('ProgressWeeklyTable-6300263-1 (Linde)'[SV]),
    FILTER(
        'ProgressWeeklyTable-6300263-1 (Linde)',
        NOT('ProgressWeeklyTable-6300263-1 (Linde)'[SV] = "Indirect" || 'ProgressWeeklyTable-6300263-1 (Linde)'[SV] = "Change Order" || ISBLANK('ProgressWeeklyTable-6300263-1 (Linde)'[SV]))
    )
)
2 ACCEPTED SOLUTIONS
marcelsmaglhaes
Super User
Super User

Hey @Nfuentes86 

It looks like you're trying to create a measure to calculate the total of 'SV' column excluding values "Indirect" and "Change Order" as well as any blank values. Your approach seems correct, but the syntax might be causing the errors. Here's a revised version of your measure:

TotalExcludingIndirectsAndChangeOrders = CALCULATE( SUM('ProgressWeeklyTable-6300263-1 (Linde)'[SV]), FILTER( 'ProgressWeeklyTable-6300263-1 (Linde)', 'ProgressWeeklyTable-6300263-1 (Linde)'[SV] <> "Indirect" && 'ProgressWeeklyTable-6300263-1 (Linde)'[SV] <> "Change Order" && NOT(ISBLANK('ProgressWeeklyTable-6300263-1 (Linde)'[SV])) ) )

In this measure:

  • We use <> operator to check for inequality.
  • We use && instead of || for logical AND operator.
  • We use NOT function around ISBLANK to exclude blank values.

Try using this revised measure and see if it resolves the errors you're encountering.

 


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!
Imagem de fundo



View solution in original post

If there are numbers in the column 'ProgressWeeklyTable-6300263-1 (Linde)'[SV], you cannot compare it with text like 'ProgressWeeklyTable-6300263-1 (Linde)'[SV] <> "Indirect". You need to substitute that column with one that contains text you want ignore...


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!
Imagem de fundo



View solution in original post

6 REPLIES 6
Nfuentes86
Frequent Visitor

Nfuentes86_0-1712951072439.png

I tried this, but as you can see its not excluiding Change Orders or Indirects from summing into the Total Row Column 

I used: 

TotalExcludingIndirectsAndChangeOrders = CALCULATE( SUM('ProgressWeeklyTable-6300263'[SV]), FILTER( 'ProgressWeeklyTable-6300263', 'ProgressWeeklyTable-6300263'[Category] <> "Indirect" && 'ProgressWeeklyTable-6300263'[Category] <> "Change Order" && NOT(ISBLANK('ProgressWeeklyTable-6300263'[SV])) ) )

 

marcelsmaglhaes
Super User
Super User

Hey @Nfuentes86 

It looks like you're trying to create a measure to calculate the total of 'SV' column excluding values "Indirect" and "Change Order" as well as any blank values. Your approach seems correct, but the syntax might be causing the errors. Here's a revised version of your measure:

TotalExcludingIndirectsAndChangeOrders = CALCULATE( SUM('ProgressWeeklyTable-6300263-1 (Linde)'[SV]), FILTER( 'ProgressWeeklyTable-6300263-1 (Linde)', 'ProgressWeeklyTable-6300263-1 (Linde)'[SV] <> "Indirect" && 'ProgressWeeklyTable-6300263-1 (Linde)'[SV] <> "Change Order" && NOT(ISBLANK('ProgressWeeklyTable-6300263-1 (Linde)'[SV])) ) )

In this measure:

  • We use <> operator to check for inequality.
  • We use && instead of || for logical AND operator.
  • We use NOT function around ISBLANK to exclude blank values.

Try using this revised measure and see if it resolves the errors you're encountering.

 


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!
Imagem de fundo



Screenshot 2024-04-09 085347.png

Hi, its still not working. 

What is the value in the column 'ProgressWeeklyTable-6300263-1 (Linde)'[SV]?


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!
Imagem de fundo



sv value.png

If there are numbers in the column 'ProgressWeeklyTable-6300263-1 (Linde)'[SV], you cannot compare it with text like 'ProgressWeeklyTable-6300263-1 (Linde)'[SV] <> "Indirect". You need to substitute that column with one that contains text you want ignore...


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!
Imagem de fundo



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.