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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
22LACMT
Helper III
Helper III

Dax expression with 2 part filter: one numeric field and one category type field

Hi,  im trying create a column that sums exposure by category type( jared roll-up) and ver.  I'm having trouble finding a funtion that allows for two filters.  I've tried to use the calculate funtion but it doesnt allow for a sum and two filters.  Any suggestions? below is sample data. 

 

22LACMT_0-1666360337089.png

 

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

Hi @22LACMT ,

You can create a similar measure as the below one:

Measure =
CALCULATE (
    SUM ( 'tablename'[Tier1Exposure] ),
    FILTER (
        'tablename',
        'tablename'[LoanDisclosure_JaredRollup] = "Permanent"
            && 'tablename'[ver] = DATE ( 2020, 12, 31 )
    )
)

In addition, you can refer the following blog to create it by yourself:

FILTER Function in DAX and Power BI: Apply Custom Filter to Calculations

 

If the above ones can't help you get the desired result, please provide some sample data in your table  (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
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

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi @22LACMT ,

You can create a similar measure as the below one:

Measure =
CALCULATE (
    SUM ( 'tablename'[Tier1Exposure] ),
    FILTER (
        'tablename',
        'tablename'[LoanDisclosure_JaredRollup] = "Permanent"
            && 'tablename'[ver] = DATE ( 2020, 12, 31 )
    )
)

In addition, you can refer the following blog to create it by yourself:

FILTER Function in DAX and Power BI: Apply Custom Filter to Calculations

 

If the above ones can't help you get the desired result, please provide some sample data in your table  (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
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

@22LACMT ,

Not very clear

 

You can have measure like

calculate(Sum(Table[Value]), filter(Table, Table[Number] = 1.2 && table[column] = "ABC"))

 

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

CALCULATE can definitely handle multiple filters. For example,

CALCULATE (
    SUM ( Table1[Exposure] ),
    Table1[JaredRollup] = "Permanent",
    Table1[ver] = 3
)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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