Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a table with a LIKE
a | b | C | CUSTOMER |
LA | BC | CA |
20 |
LC | BA | 50 | |
LD | CC |
|
And tabbel B as same format
a | b | c | sale | Session |
LC | BA | 500 | 32443 | |
LD | BC | 111 | 343 | |
LA | CA | 22 | 34324 | |
LD | CA | 333Need Help | 34434 |
I want to create the visulization with the filterwith Hierarchy on a, b,c th Show and Tellat can cover both the table , looks to be the data model and DAX support
@Ritaf1983
Solved! Go to Solution.
Hi @santoshhmsam50 ,
You need to create the following relational columns in each table and then create hierarchical tables. Then apply the following formula to the metric table.
CombinedKey = [a] & "|" & [b] & "|" & [c]
HierarchyTable = DISTINCT(
UNION(
SELECTCOLUMNS('TableA', "a", [a], "b", [b], "c", [c]),
SELECTCOLUMNS('TableB', "a", [a], "b", [b], "c", [c])
)
)
SumCustomer =
CALCULATE(
SUM(TableA[CUSTOMER]),
TREATAS(
VALUES(HierarchyTable[CombinedKey]),
TableA[CombinedKey]
)
)
SumSales =
CALCULATE(
SUM(TableB[sale]),
TREATAS(
VALUES(HierarchyTable[CombinedKey]),
TableB[CombinedKey]
)
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks a lot for solving and explaining it in such a simple way 🙂
Hi @santoshhmsam50 ,
You need to create the following relational columns in each table and then create hierarchical tables. Then apply the following formula to the metric table.
CombinedKey = [a] & "|" & [b] & "|" & [c]
HierarchyTable = DISTINCT(
UNION(
SELECTCOLUMNS('TableA', "a", [a], "b", [b], "c", [c]),
SELECTCOLUMNS('TableB', "a", [a], "b", [b], "c", [c])
)
)
SumCustomer =
CALCULATE(
SUM(TableA[CUSTOMER]),
TREATAS(
VALUES(HierarchyTable[CombinedKey]),
TableA[CombinedKey]
)
)
SumSales =
CALCULATE(
SUM(TableB[sale]),
TREATAS(
VALUES(HierarchyTable[CombinedKey]),
TableB[CombinedKey]
)
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks a lot for solving and explaining it in such a simple way 🙂
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
18 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
24 | |
10 | |
10 | |
9 | |
7 |