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,
VALUES used in below measure calculation is returning error, can someone help to rewrite the DAX...[Status] values can be NULL, 0,100,2,3,4,5....TIA
Solved! Go to Solution.
Than you need an itirator.
Try
SUMX(
VALUES('Calendar'[Date]),
SWITCH(
'VOD'[Status],
2, [CValueTARGET]*100, --{or, if this isn't a measure, 'VOD'[CValueTARGET]*100}
3, [CValuePLAN]*100,
'VOD'[Status]
)
You may need to replace VALUES('Calendar'[Date]) by the field you're iterating over (I'm not sure wether it's by date, by products, both, etc...)
Hi @kumsha1 ,
Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thanks in advance for your kind cooperation!
Hope it helps,
Community Support Team _ Caitlyn
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
How about:
SWITCH(
SELECTEDVALUE('VOD'[Status]),
2, [CValueTARGET]*100, --{or, if this isn't a measure, SELECTEDVALUE('VOD'[CValueTARGET])*100}
3, [CValuePLAN]*100,
SELECTEDVALUE('VOD'[Status])
)
Than you need an itirator.
Try
SUMX(
VALUES('Calendar'[Date]),
SWITCH(
'VOD'[Status],
2, [CValueTARGET]*100, --{or, if this isn't a measure, 'VOD'[CValueTARGET]*100}
3, [CValuePLAN]*100,
'VOD'[Status]
)
You may need to replace VALUES('Calendar'[Date]) by the field you're iterating over (I'm not sure wether it's by date, by products, both, etc...)
@kumsha1 , Try like
DAILYCValue = IF(Max('VOD'[Status])=2,[CValueTARGET]*100,
IF(Max('VOD'[Status])=3,[CValuePLAN]*100,
max('VOD'[Status])))
You can also try switch true
Hi @amitchandak ,
MAX will work to satify the IF conditions but ELSE will always show MAX(Status) for all other scenarios whereas we need to show actual status.
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 |
|---|---|
| 79 | |
| 49 | |
| 35 | |
| 31 | |
| 30 |