Forum Discussion

jimrosser's avatar
jimrosser
Helper III
1 year ago
Solved

If selected value is All Formula

Hi I"m trying to create a measure based on two measures when the selected value is = "ALL" or <> "ALL"

Below is the measure I've been working with but it won't calculate.  Any helps is much appreciated

 

BUD_Sales_SELECTED_PERIOD =
    IF (
    SELECTEDVALUE (vwPBIDate[Fiscal Month Number]) = "All",
    calculate( [Bud_Sales_Rev_ALL])  ,
   if ( SELECTEDVALUE ( vwPBIDate[Fiscal Month Number] ) <> "All", calculate( [Bud_Sales_YEAR]) ) )
  • If date table is filtered return the all measure else the year measure

    IF (
        not ISCROSSFILTER(vwPBIDate[Fiscal Month Number]),
        calculate( [Bud_Sales_Rev_ALL]),
        calculate( [Bud_Sales_YEAR]) 
    )

     

2 Replies

  • Deku's avatar
    Deku
    Super User

    If date table is filtered return the all measure else the year measure

    IF (
        not ISCROSSFILTER(vwPBIDate[Fiscal Month Number]),
        calculate( [Bud_Sales_Rev_ALL]),
        calculate( [Bud_Sales_YEAR]) 
    )

     

    • jimrosser's avatar
      jimrosser
      Helper III

      Thanks Deku - I did have to change the ISCROSSFILTER to ISCROSSFILTERED but it worked, Thank you very much!