Forum Discussion

lilykim's avatar
lilykim
New Member
2 years ago
Solved

How do I insert different date filter for one column only?

Week EndingActualGoalCurrent Ratio %Previous Ratio %
MM/DD/YYYY HH:MMAB(Table[Actual]/Table[Goal])*100((Table[Actual]/Table[Goal])*100)-7 ???

 

Hello,

 

I'm trying to display the Current Ratio % value and Previous Ratio % value simultaneously, by applying a filter onto column [Previous Ratio %].

 

The Current Ratio % is a new column with the calculations = (Table[Actual]/Table[Goal])*100
I also have a measure for previous week = previous_week_ending = DATEADD(Table[week_ending],-7,DAY)

 

So far I have tried:

  • CALCULATE(Table[Current Ratio %],previous_week_ending)

and

  • CALCULATE((Table[Actual]/Table[Goal])*100,previous_week_ending)

but those didn't work due to syntax and dax errors.

Please help me out!

  • lilykim 

    pls try this

    Measure 2 = sumx(FILTER(all('Table'),'Table'[week ending]=max('Table'[week ending])-7),[Measure])

    pls see the attachment below

    pervious ratio.pbix18 KB

3 Replies

  • could you pls provide some sample data and the expected output?

    • lilykim's avatar
      lilykim
      New Member

      Hi ryan_mayu

      Here is sample data:


      In a PBI table visualization, I want the last column [Previous Ratio %] to output the last week ending's [Current Ratio %].

       

      • ryan_mayu's avatar
        ryan_mayu
        Super User

        lilykim 

        pls try this

        Measure 2 = sumx(FILTER(all('Table'),'Table'[week ending]=max('Table'[week ending])-7),[Measure])

        pls see the attachment below

        pervious ratio.pbix18 KB