Forum Discussion

7 Replies

  • Refer this:

    https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115

     

    Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
    In case it does not help, please provide additional information and mark me with @

    Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
    Proud to be a Datanaut Connect on Linkedin

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

    Hi Anonymous ,

    After creating parameters, a parameter table will be created. When you use it in the formulas, it can't be used directly in measures. You still need to use the function of SWITCH to change the value. So you don't have to create parameters. As amitchandak suggested, You could just create measures using SWITCH function to implement it.

     

    Best Regards,

    Xue Ding

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      I want to reduce the amount of measures that i need to create, I have two different columns which i use for almost all my measures
      I thought would it be possible to make it "dynamic" or "filterable"?

      So for example 

      measure 1 = divide(gross ; revenue or profit)
      measure 2 = divide (margin ; revenue or profit)

      So i would like to just create 1 measure that divide either one of the columns profit or revenue depending on which one i choose.

      woudl that be possible?

    • Anonymous's avatar
      Anonymous
      Not applicable

      My main purpose is to reduce the amount of measures that i have to create as i have make for example 100 measures which could maybe be reduced to 50 as it is almost the same forumula only with an other column

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

        Hi Anonymous Anonymous ,

        For your requirement, it is not good choice for reducing the amount of measures to use parameters. It will use more measures and be more complicated. Using measures is easy and quick way for the situation.

         

        You could try variables to combine and improve your formulas to reduce the amount of measures.

        DAX: Use variables to improve your formulas 

         

        Best Regards,

        Xue Ding

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    I didn't know that this was possible in Power BI, but if I am understanding it right, it is possible to pick a slicer, and it would affect multiple measures/visuals across a report?

     

    Example – Swap Measures Using Parameters - Tableau

    I was thinking of the parameters features in Tableau, and it's much less clunky. Is there a workbook example of how Power BI does it?