Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi all,
I have two tables: SUM table and BR table (*table BR has no records)
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?
Solved! Go to Solution.
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]
)
)
)
)
Wish it is helpful for you!
Best Regards
Lucien
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]
)
)
)
)
Wish it is helpful for you!
Best Regards
Lucien
@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"}))
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
| User | Count |
|---|---|
| 55 | |
| 37 | |
| 27 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 69 | |
| 58 | |
| 38 | |
| 21 | |
| 21 |