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.
I'm looking for a DAX formula that calculates the sum using two other tables. One table shows how often a certain code occurs. And in a dimension table is the duration of this code. In the example below you can see what my question is exactly:
Solved! Go to Solution.
Hi @brief001
Try this:
Measure =
VAR _Dur =
ADDCOLUMNS(
'Table 2',
"Dur1",
[Amount]
* ( LOOKUPVALUE( 'Table 3'[Duration], 'Table 3'[Code], 'Table 2'[Code] ) )
)
RETURN
SUMX( _Dur, [Dur1] )
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Hi @brief001
Try this:
Measure =
VAR _Dur =
ADDCOLUMNS(
'Table 2',
"Dur1",
[Amount]
* ( LOOKUPVALUE( 'Table 3'[Duration], 'Table 3'[Code], 'Table 2'[Code] ) )
)
RETURN
SUMX( _Dur, [Dur1] )
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Thank you VahidDM, this formula works exactly as hoped. 😀
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 |
---|---|
49 | |
26 | |
21 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |