Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Space-efficient alternative to storing URLs as calculated fields

I have 2 URLs  as  calculated fields in the META TABLE ,that are only needed to display in the report, and no calculation depends on them. Is there not a way to generate them on the fly when needed, as opposed to pre-calculating all of them as calculated fields?

 

URL 1 = CONCATENATE(META[Path],"/ad")

 

FILE --> SAMPLE.pbix 

  • You could make use of SELECTEDVALUE...

    URL Measure = 
    
    VAR SelectedPath = SELECTEDVALUE ( META[Path] )
    VAR SelectedAddition = "ad"
    
    VAR Result =
        IF ( NOT ISBLANK ( SelectedPath ) && NOT ISBLANK ( SelectedAddition), SelectedPath & SelectedAddition, BLANK () )
    
    RETURN Result

     

    Make sure the data category of the measure is set as URL:

     

1 Reply

  • bcdobbs's avatar
    bcdobbs
    Icon for Community Champion rankCommunity Champion

    You could make use of SELECTEDVALUE...

    URL Measure = 
    
    VAR SelectedPath = SELECTEDVALUE ( META[Path] )
    VAR SelectedAddition = "ad"
    
    VAR Result =
        IF ( NOT ISBLANK ( SelectedPath ) && NOT ISBLANK ( SelectedAddition), SelectedPath & SelectedAddition, BLANK () )
    
    RETURN Result

     

    Make sure the data category of the measure is set as URL: