We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
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 |
---|---|
64 | |
59 | |
46 | |
35 | |
32 |
User | Count |
---|---|
85 | |
83 | |
70 | |
49 | |
46 |