Forum Discussion

Matheus_bnm's avatar
Matheus_bnm
Advocate I
9 years ago
Solved

Filter as a reference

Hi everyone.   I'm working on a Sales Table like this one below:      DATE     PRODUCT ID    Revenue 1/1/2015         AA               100 2/2/2015         AB               200 3/3/2015       ...
  • v-qiuyu-msft's avatar
    9 years ago

    Hi Matheus_bnm,

     

    In your scenario, you can create another table which has the DATE and Revenue columns. Make sure there is no relationship between this new table and the original one.

     

    Table = SELECTCOLUMNS('Fact',"Date",'Fact'[Date],"Revenue",'Fact'[Revenue])

     

    Then create a measure in this new table:

    SelectValue = IF(HASONEVALUE('Table'[Date]),VALUES('Table'[Revenue]),BLANK())

     

    Create a measure in original table:

    Revenue(NEW) = DIVIDE(SUM(Fact[Revenue]),'Table'[SelectValue],0)

     

    Then drag the Date column from the new table into a slicer visual,

     

     

     

    Best Regards,
    Qiuyun Yu