Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi, i have the code below and was wondering how to have it so if "all" were selected on the filter it would show another value?
Really stuck on this one.
Calc Rework Target =
SWITCH( TRUE(),
"A P" in allselected('Index_Part Information'[Additional_Field_2]) , 1000 ,
"AP Jet" in allselected('Index_Part Information'[Additional_Field_2]) , 150 ,
"SSO" in allselected('Index_Part Information'[Additional_Field_2]) , 500 ,
"LMT" in allselected('Index_Part Information'[Additional_Field_2]) , 500 )
Solved! Go to Solution.
Hi @Jackbaz99 ,
You may try this Measure.
Rework Target =
VAR Table_ =
ADDCOLUMNS (
'Index_Part Information',
"Target",
SWITCH (
TRUE (),
"A P" IN ALLSELECTED ( 'Index_Part Information'[Additional_Field] ), 1000,
"AP Jet" IN ALLSELECTED ( 'Index_Part Information'[Additional_Field] ), 150,
"SSO" IN ALLSELECTED ( 'Index_Part Information'[Additional_Field] ), 500,
"LMT" IN ALLSELECTED ( 'Index_Part Information'[Additional_Field] ), 500,
ISBLANK ( SELECTEDVALUE ( 'Index_Part Information'[Additional_Field] ) ), 0
)
)
RETURN
SUMX ( Table_, [Target] )
Then, the result will look like this.
Also, attached the pbix file as reference.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Hi @Jackbaz99 ,
You may try this Measure.
Rework Target =
VAR Table_ =
ADDCOLUMNS (
'Index_Part Information',
"Target",
SWITCH (
TRUE (),
"A P" IN ALLSELECTED ( 'Index_Part Information'[Additional_Field] ), 1000,
"AP Jet" IN ALLSELECTED ( 'Index_Part Information'[Additional_Field] ), 150,
"SSO" IN ALLSELECTED ( 'Index_Part Information'[Additional_Field] ), 500,
"LMT" IN ALLSELECTED ( 'Index_Part Information'[Additional_Field] ), 500,
ISBLANK ( SELECTEDVALUE ( 'Index_Part Information'[Additional_Field] ) ), 0
)
)
RETURN
SUMX ( Table_, [Target] )
Then, the result will look like this.
Also, attached the pbix file as reference.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
@Jackbaz99 Maybe:
Calc Rework Target =
SWITCH( TRUE(),
COUNTROWS('Index_Part Information') = COUNTROWS(ALL('Index_Part Information')), 999,
"A P" in allselected('Index_Part Information'[Additional_Field_2]) , 1000 ,
"AP Jet" in allselected('Index_Part Information'[Additional_Field_2]) , 150 ,
"SSO" in allselected('Index_Part Information'[Additional_Field_2]) , 500 ,
"LMT" in allselected('Index_Part Information'[Additional_Field_2]) , 500 )
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 22 | |
| 12 | |
| 10 | |
| 10 | |
| 9 |