Forum Discussion

campelliann's avatar
campelliann
Post Patron
4 years ago
Solved

Using ISINSCOPE HASONEVALUE to solve this?

Hi, 

So I have this sort of measure to calculate the revenue. Calculate(sum(table[revenue], keepfilters(calendar [date]<today())).


Now I would like to use this same measure (with the necessary changes) on 1) Bar chart, where I have the months in x axis, and on a 2) KPI Card. The thing with the KPI Card is that it will show the revenue of the last month, and I want the YTD cumulative. Can I use something like if hasonevalue/isinscope Calendar[date]  measure with keep filters, if not measure without keep filters.


Thanks

  • campelliann , isinscope can help

     

    example

    if(isinscope(Date[Month]), [revenue],[revenue ytd])

     

    YTD revenue= CALCULATE([revenue]),DATESYTD('Date'[Date],"12/31"))

     

     

1 Reply

  • campelliann , isinscope can help

     

    example

    if(isinscope(Date[Month]), [revenue],[revenue ytd])

     

    YTD revenue= CALCULATE([revenue]),DATESYTD('Date'[Date],"12/31"))