Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi!
I'm stuck and would very much appreciate some help 🙂
I have two tables that lookes like this, with two different relations:
I have Measure 1: Number of rows = DISTINCTCOUNT('FactTable'[ID])
and then I would like to have another Measure 2:
Number of rows, Other department =
CALCULATE([Number of rows];FILTER(FactTable;
"Physical team's department" <> "Responsible team's department")
But I don't know how to write this....
I have come so far that I think that the first part of the filter-expression should be: RELATED(DimOrganizationTable[Department]) <>..... But the second part I can't figure out. I'm thinking that it's maybe somthing with USERELATIONSHIP. But I can't get it to work.
Thanks so much in advance! And have a nice weekend! 🙂
Solved! Go to Solution.
Hello @Anonymous
You may try this:
Other department =
CALCULATE (
[Number of rows],
FILTER (
FactTable,
RELATED ( dimOrgTable[Department] )
<> LOOKUPVALUE (
dimOrgTable[Department],
dimOrgTable[Team_PK], FactTable[Responsible Team]
)
)
)
Cheers!
Vivek
If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂
https://www.vivran.in/
Connect on LinkedIn
Hi,
Here's my take. In the Fact Table, create a calculated column to bring over the Physical Teams's department column from the Dim Table
Column1 = RELATED(DimOrganizationTable[Department])
Column2 = LOOKUPVALUE(DimOrganizationTable[Department],DimOrganizationTable[Team_PK],FactTable[ID])
Now write this measure
=CALCULATE([Number of rows],FILTER(FactTable,[Column1]<>[Column2]))
Hope this helps.
Hi, @Anonymous
Based on your description, you may create a measure as follows.
Count =
CALCULATE(
DISTINCTCOUNT(FactTable[ID]),
FILTER(
FactTable,
LOOKUPVALUE(DimOrangnizationTable[Department],DimOrangnizationTable[Team_PK],FactTable[Physical team]) <>
LOOKUPVALUE(DimOrangnizationTable[Department],DimOrangnizationTable[Team_PK],FactTable[Responsible team])
)
)
Resutl:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Here's my take. In the Fact Table, create a calculated column to bring over the Physical Teams's department column from the Dim Table
Column1 = RELATED(DimOrganizationTable[Department])
Column2 = LOOKUPVALUE(DimOrganizationTable[Department],DimOrganizationTable[Team_PK],FactTable[ID])
Now write this measure
=CALCULATE([Number of rows],FILTER(FactTable,[Column1]<>[Column2]))
Hope this helps.
Hello @Anonymous
You may try this:
Other department =
CALCULATE (
[Number of rows],
FILTER (
FactTable,
RELATED ( dimOrgTable[Department] )
<> LOOKUPVALUE (
dimOrgTable[Department],
dimOrgTable[Team_PK], FactTable[Responsible Team]
)
)
)
Cheers!
Vivek
If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂
https://www.vivran.in/
Connect on LinkedIn
Thank you so much! 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
107 | |
105 | |
87 | |
61 |