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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply

DAX formula calculated with multiple FILTER

I'm looking for a formula that will count the number of rows that meets the following requirements;

- The number of invoices with the same “Number” must be added together.

- Only the invoices that are either “Volledig verrekend” or “Afgeboekt” may be included in the count (Column Variety)

- If possible, I also want to add this requirement: the number of invoices that have one unique “Number” of which the sum of “Amount” is 0.

 

angelikakolacz_0-1664267272976.png

 

This is what i want ass output: 

angelikakolacz_1-1664267788703.png

 

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi ,

 

You may try this Calculated column.

Catgory =
VAR num =
    CALCULATE (
        COUNT ( 'Table'[Number] ),
        FILTER (
            ALLEXCEPT ( 'Table', 'Table'[Number] ),
            'Table'[Variety] IN { "Volledig verrekend", "Afgeboekt" }
        )
    )
RETURN
    IF ( num <= 1, 0, num )

 

The result looks like this.

vcazhengmsft_0-1664356095616.png

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

View solution in original post

1 REPLY 1
v-cazheng-msft
Community Support
Community Support

Hi ,

 

You may try this Calculated column.

Catgory =
VAR num =
    CALCULATE (
        COUNT ( 'Table'[Number] ),
        FILTER (
            ALLEXCEPT ( 'Table', 'Table'[Number] ),
            'Table'[Variety] IN { "Volledig verrekend", "Afgeboekt" }
        )
    )
RETURN
    IF ( num <= 1, 0, num )

 

The result looks like this.

vcazhengmsft_0-1664356095616.png

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors