Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

DAX SWITCH STATEMENT not working properly

Hello, I am just trying to make a mesure by using SWITCH statement. but it is not working properly. I don't know why. Here is my code. I feel like there is something wrong with SWITCH statement be...
  • v-yingjl's avatar
    v-yingjl
    6 years ago

    Hi Anonymous ,

    Based on my test and reasearch, I have added a filter in your [Construction Income (Budget)] measure and now it can show the correct result:

     

    Construction Income (Budget) = CALCULATE(SUM('Budget For Meters'[Budget]), FILTER(ALL('Budget For Meters'),'Budget For Meters'[Description] = "1.Construction Income"))

     

    Attached the modifed dummy file, please check it: Dummy.pbix

     

    Best Regards,
    Yingjie Li

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.