Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
13 | |
13 | |
12 | |
8 | |
7 |
User | Count |
---|---|
16 | |
13 | |
11 | |
11 | |
9 |