Forum Discussion
vidheesha
4 years agoNew Member
Stuck with the sum and if
Hi All, I am trying to replicate the SQL case when statement in the Power BI as a calculated measure. The SQL statement is (CASE WHEN 'Target Flag' = 'Actual' AND 'Date.FYear' = '2023' THE...
- 3 years ago
Hi, vidheesha ;
Try it.
measure = IF ( MAX ( [Target Flag] ) = "Actual" && MAX ( [Date.FYear] ) = 2023, SUM ( [X.var] ), 0 )
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
VijayP
Community Champion
4 years agoSwitch(sum(valuecolumn), 'Target Flag' = 'Actual' && 'Date.FYear' = '2023', "Required value",0)
More powerbi tips on www.youtube.com/perepavijay