Forum Discussion

netanel's avatar
netanel
Post Prodigy
4 years ago
Solved

Filters

Hey All!

I have a problem
I know it is common but I have not found the solution out there

I have two columns of Amount & Budget 
I need to display both in one table
The problem is that Amount is filtered by Yes
And Budget filtered by NO
It turns out that if I run the filter one of the columns disappears

How do you solve this?

 

  • Samarth_18 

    Sorry for the mess
    I found the logic

    Net USD AVG for Budget =
    CALCULATE(
        [Net USD AVG],
        'DB 2022'[Data Source] IN { "Budget 2022" , "Budget 2021","Budget 2020" }
    )
     
    This way i take all the years
     
    Net USD AVG for YES =
    CALCULATE(
        [Net USD AVG],
        'DB 2022'[BI Platform] IN { "YES" })
     
    and in this way i take allso the "Yes" filter
     
    Thanks for halping
     

3 Replies

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    HI netanel ,

     

    If I understood your question in a right way then you can create a new column with below code and use it further:-

    column  = coalesce([amount],[budget])

     

    Thanks,

    Samarth

     

    • netanel's avatar
      netanel
      Post Prodigy

      Hey Samarth_18 

      How are you?

      My mistake,

      It looks more like that

       

      I wrote these two Measure
      But as soon as I change a year
      The budget does not come
      Because it is only filtered to 2022 in the Measure

       

      Net USD AVG for Budget =
      CALCULATE(
          [Net USD AVG],
          'DB 2022'[Data Source] IN { "Budget 2022" })
       
      Net USD AVG for YES =
      CALCULATE(
          [Net USD AVG],
          'DB 2022'[BI Platform] IN { "YES" })

       

      Thanks!

      • netanel's avatar
        netanel
        Post Prodigy

        Samarth_18 

        Sorry for the mess
        I found the logic

        Net USD AVG for Budget =
        CALCULATE(
            [Net USD AVG],
            'DB 2022'[Data Source] IN { "Budget 2022" , "Budget 2021","Budget 2020" }
        )
         
        This way i take all the years
         
        Net USD AVG for YES =
        CALCULATE(
            [Net USD AVG],
            'DB 2022'[BI Platform] IN { "YES" })
         
        and in this way i take allso the "Yes" filter
         
        Thanks for halping