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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
cs141005
Regular Visitor

Retrieve selected values from another table

Hi all,

 

I have two tables: SUM table and BR table (*table BR has no records)

cs141005_0-1627412361974.png

cs141005_1-1627412379420.png

So, i want to fill BR table with some values from SUM table and also make some calculations.

How can i achieve the desired output?

 

 

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

Hi @cs141005 ,

You could delete the BR table blank value ,then use the following dax to create new column :

Jan MTD1 = 
CALCULATE (
    SUM ( 'Sum Table'[Jan] ),
    FILTER (
        ALL ( 'Sum Table' ),
        IF ('BR table'[title] = "Users+New client",
                'Sum Table'[title] = "New users"
                  || 'Sum Table'[title] = "users" ,
            
            IF (
                'Sum Table'[title] = "New users",
            'BR table'[title] = "New clients"  ,
                'Sum Table'[title] = 'BR table'[title]
            )
        )
    )
)
FEB MTD1 = 
CALCULATE (
    SUM ( 'Sum Table'[Feb] ),
    FILTER (
        ALL ( 'Sum Table' ),
        IF ('BR table'[title] = "Users+New client",
                'Sum Table'[title] = "New users"
                  || 'Sum Table'[title] = "users" ,
            
            IF (
                'Sum Table'[title] = "New users",
            'BR table'[title] = "New clients"  ,
                'Sum Table'[title] = 'BR table'[title]
            )
        )
    )
)

vluwangmsft_0-1627635813584.png

 

 

Wish it is helpful for you!

 

Best Regards

Lucien

 

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @cs141005 ,

You could delete the BR table blank value ,then use the following dax to create new column :

Jan MTD1 = 
CALCULATE (
    SUM ( 'Sum Table'[Jan] ),
    FILTER (
        ALL ( 'Sum Table' ),
        IF ('BR table'[title] = "Users+New client",
                'Sum Table'[title] = "New users"
                  || 'Sum Table'[title] = "users" ,
            
            IF (
                'Sum Table'[title] = "New users",
            'BR table'[title] = "New clients"  ,
                'Sum Table'[title] = 'BR table'[title]
            )
        )
    )
)
FEB MTD1 = 
CALCULATE (
    SUM ( 'Sum Table'[Feb] ),
    FILTER (
        ALL ( 'Sum Table' ),
        IF ('BR table'[title] = "Users+New client",
                'Sum Table'[title] = "New users"
                  || 'Sum Table'[title] = "users" ,
            
            IF (
                'Sum Table'[title] = "New users",
            'BR table'[title] = "New clients"  ,
                'Sum Table'[title] = 'BR table'[title]
            )
        )
    )
)

vluwangmsft_0-1627635813584.png

 

 

Wish it is helpful for you!

 

Best Regards

Lucien

 

Fowmy
Super User
Super User

@cs141005 

You need to create  a new table with the following code:

BR Table = 
UNION(
    'SUM TABLE',
    ROW( "Title", {"New Users + Users"},"Jan", CALCULATE(SUM('SUM TABLE'[Jan]),'SUM TABLE'[Title] IN {"New Users", "Users"})
    ,"Feb", CALCULATE(SUM('SUM TABLE'[Feb]),'SUM TABLE'[Title] IN {"New Users", "Users"}))
) 

Fowmy_0-1627414271683.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors