Forum Discussion

Invisibleman's avatar
Invisibleman
Icon for Helper II rankHelper II
3 years ago
Solved

Can you use selectedmeasure without Tabular Editor??

Dear all,   I am looking at the function selectedmeasure. But when I am searching the internet, then I only see the videos, where they are using the Tabular Editor to create Calculation Groups and ...
  • tamerj1's avatar
    3 years ago

    Hi Invisibleman 

    manually created a disconnected table that contains two values ("Amount" and "Qty") which ahall be used as a slicer or a matrix visual then the result measure would be

    ResultMeasure =
    SWITCH (
    SELECTEDVALUE ( MeasureSelection[Measure] ),
    "Amount", [SourceMeasure1],
    "QTY", [SourceMeasure2]
    )

    the SelMeasure would be 

    SelMeasure =
    TOTALQTD ( [ResultMeasure], DateTime[DateKey] )

  • Invisibleman's avatar
    Invisibleman
    3 years ago

    Hello tamerj1,

     

    Sorry for the late reply, but I had to test and see how to get it the way I wanted to have. The answer, is not same as I was thinking when I asked the question. As I was more thinking about the command selectedmeasure, that will replace the measurename so you would get selectedmeasure[amount'] or selectedmeasure[QTY]. But when looking back, this is my own mistake and should explain better.

     

    That said, your answer did help me a lot. I now can make only 1 measure for the formula I want need (like totalMTD, totalQTD & TotalYTD) and then based on your example, I can make it that multiple databases/tables can address this and I am getting the correct result.

     

    So even not exactly that what I was looking for, it is still very workable and helpfull.

     

    thanks again,

     

    Hans