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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Hong_HW
Frequent Visitor

To get a combined value in the table by applying different filter value

Dear All,

 

I would like to seek some help regarding the BI filters and tables.

I want to build a table with the combined value from both Product AAA & Prodcut BBB by applying the different filter value.

 

I have uploaded the PBI file here https://drive.google.com/file/d/15jO-jFcpn_NIW03ixCnthKkYoj1YpvBY/view?usp=sharing

 

Hong_HW_1-1654346492050.png

Hong_HW_0-1654346670393.png

 

 

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

Hi @Hong_HW ,

I updated your sample pbix file(see attachment), please check whether that is what you want.

1. Create a calculated table as below copied with the table 'Time_Required':

 

Time_Required2 = 'Time_Required'

 

yingyinr_0-1654570585681.png

2. Create a slicer with the field [Time Required] in new table 'Time_Required' to replace the slicer "Filter for Product BBB"

yingyinr_0-1654587237649.png

3. Remove the relationship between Time_Required and Test_Data

yingyinr_1-1654587318853.png

4. Create two measures as below and place them on the top two matrix Values field instead of the original Values field

AAA =
CALCULATE (
    SUM ( 'Test_Data'[Value] ),
    FILTER (
        'Test_Data',
        'Test_Data'[Time Required] = SELECTEDVALUE ( 'Time_Required'[Time Required] )
    )
)
BBB = 
CALCULATE (
    SUM ( 'Test_Data'[Value] ),
    FILTER (
        'Test_Data',
        'Test_Data'[Time Required] = SELECTEDVALUE ( 'Time_Required2'[Time Required] )
    )
)

yingyinr_2-1654587840464.png

5. Create a measure as below to get the sum value of product AAA and BBB

 

Measure = 
SUMX ( FILTER ( 'Test_Data', 'Test_Data'[Product Name] = "AAA" ), [AAA] )
    + SUMX ( FILTER ( 'Test_Data', 'Test_Data'[Product Name] = "BBB" ), [BBB] )

 

yingyinr_3-1654587891310.png

If the above one can't help you get the desired result, please provide some sample data in your tables (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

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Hong_HW ,

I updated your sample pbix file(see attachment), please check whether that is what you want.

1. Create a calculated table as below copied with the table 'Time_Required':

 

Time_Required2 = 'Time_Required'

 

yingyinr_0-1654570585681.png

2. Create a slicer with the field [Time Required] in new table 'Time_Required' to replace the slicer "Filter for Product BBB"

yingyinr_0-1654587237649.png

3. Remove the relationship between Time_Required and Test_Data

yingyinr_1-1654587318853.png

4. Create two measures as below and place them on the top two matrix Values field instead of the original Values field

AAA =
CALCULATE (
    SUM ( 'Test_Data'[Value] ),
    FILTER (
        'Test_Data',
        'Test_Data'[Time Required] = SELECTEDVALUE ( 'Time_Required'[Time Required] )
    )
)
BBB = 
CALCULATE (
    SUM ( 'Test_Data'[Value] ),
    FILTER (
        'Test_Data',
        'Test_Data'[Time Required] = SELECTEDVALUE ( 'Time_Required2'[Time Required] )
    )
)

yingyinr_2-1654587840464.png

5. Create a measure as below to get the sum value of product AAA and BBB

 

Measure = 
SUMX ( FILTER ( 'Test_Data', 'Test_Data'[Product Name] = "AAA" ), [AAA] )
    + SUMX ( FILTER ( 'Test_Data', 'Test_Data'[Product Name] = "BBB" ), [BBB] )

 

yingyinr_3-1654587891310.png

If the above one can't help you get the desired result, please provide some sample data in your tables (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.

Thank you so much, it works 🙂

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.