Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 🙂
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
10 |