Forum Discussion

MarkPalmberg's avatar
MarkPalmberg
Kudo Commander
3 years ago
Solved

Tabular Editor Format String Expression help

Hi.   I'm new to Tabular Editor and calculation groups, and I'm wondering if I might get some advice.   I have a table containing a dimension that controls dynamic measure selection in my PBIX. I...
  • MarkPalmberg's avatar
    3 years ago

    Well, the (a) solution appears to be to not use SELECTEDMEASURENAME() in the Format String Expression box but to use the SELECTEDVALUE() from my Measure Dimensions table. Like:

     

    VAR DOLLARS = 
        SWITCH(
            TRUE(),
            SELECTEDVALUE('Measure Dimensions'[Dimension]) = "Accepted Sum",1,
            SELECTEDVALUE('Measure Dimensions'[Dimension]) = "Ask Sum",1,
            0
        )
    VAR SumFormat = ( "$#,#.00")
    VAR CountFormat = ( "(#,0)")
    RETURN 
        IF (DOLLARS,SumFormat,CountFormat)

     

    Thanks again for your time looking at this, Anonymous ! I really appreciate it and am sorry to have wasted it!

     

    EDIT: Here's the post that finally got through my thick skull.