Forum Discussion

Oros's avatar
Oros
Post Prodigy
5 years ago
Solved

Pricing Table

Hello.

 

We have a pricing table for customers with diferrent price levels.  From time to time, we temporarily change the value with starting date and ending date.

 

 

In Power Bi, how do we show the price if the ending date is future, else show the price with the blank ending date.  For example, for P6 price, the price should show 14.  But if the Power Bi report is run later

 

Thanks. 

  • Hi Oros ,

     

    Please use the following measure:

     

    Measure = IF(MAX('Table'[ENDING DATE])>TODAY(), CALCULATE(MAX('Table'[PRICE]),FILTER('Table','Table'[ENDING DATE] = MAX('Table'[ENDING DATE]))), CALCULATE(MAX('Table'[PRICE]),FILTER('Table','Table'[ENDING DATE] = BLANK())))

     

    For more details, please refer to the pbix file.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    Best Regards,

    Dedmon Dai

     

3 Replies

  • Oros's avatar
    Oros
    Post Prodigy

    Hello.

     

    We have a pricing table for customers with diferrent price levels.  From time to time, we temporarily change the value with starting date and ending date.

     

     

     

    In Power Bi, how do we show the price if the ending date is future, else show the price with the blank ending date.  For example, for P6 price, the price should show 14.  But if the Power Bi report is run later than August 31, 2021, the P6 value should be 16 (blank ending date).

     

    Thanks

  • v-deddai1-msft's avatar
    v-deddai1-msft
    Community Support

    Hi Oros ,

     

    Please use the following measure:

     

    Measure = IF(MAX('Table'[ENDING DATE])>TODAY(), CALCULATE(MAX('Table'[PRICE]),FILTER('Table','Table'[ENDING DATE] = MAX('Table'[ENDING DATE]))), CALCULATE(MAX('Table'[PRICE]),FILTER('Table','Table'[ENDING DATE] = BLANK())))

     

    For more details, please refer to the pbix file.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    Best Regards,

    Dedmon Dai

     

    • Oros's avatar
      Oros
      Post Prodigy

      DEDMOND  your solution works perfect!!!  Thank you so much for your great help.