Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi all,
I got the following dax code:
Hi @MarcoW91,
You can add a variable to store the selection items, then you can add if statements in your expression to achieve parameterized calculations:
Future Forecast =
VAR selection =
VALUES ( DIM_SPGHierarchy[SPG] )
RETURN
SUMX (
'FC UnderRev',
'FC UnderRev'[COS URev_FC]
* (
1
+ IF ( "WirePercentage" IN selection, [WirePercentage] )
+ IF ( "WireRodPercentage" IN selection, [WireRodPercentage] )
+ IF ( "ProfilePercentage" IN selection, [ProfilePercentage] )
+ IF ( "PowderPercentage" IN selection, [PowderPercentage] )
)
)
Regards,
Xiaoxin Sheng
I want to apply this code only on the selected items from a filter
There's a DAX function for that - FILTERS(). Also read about VALUES() and ISFILTERED().
User | Count |
---|---|
83 | |
76 | |
71 | |
68 | |
54 |
User | Count |
---|---|
105 | |
100 | |
91 | |
79 | |
68 |