Forum Discussion

MischaT's avatar
MischaT
Frequent Visitor
4 years ago
Solved

DAX - Dynamic Measure based on slicer selection

Hello there!    I need some guidance again please 🙂   I am using the following measure to calculate distance:    EVENT TABLE ID PLACE TYPE LAT LONG 01 PRETORIA HAILSTORM -29...
  • AlB's avatar
    AlB
    4 years ago

    MischaT 

    Get the lat, long of the site in the same fashion:

    VAR IDLat = SELECTEDVALUE(EventTable[Lat])

    VAR IDLong = SELECTEDVALUE(EventTable[Long])

    VAR SiteLat = SELECTEDVALUE(SitesTable[Lat])

    VAR SiteLong = SELECTEDVALUE(SitesTable[Long])

    then apply your formulae.

    If this does not work I'd probablyn need a mock pbix reproducing the issue so that I can see exactly what you are doing. You have to share the URL to the file hosted elsewhere: Dropbox, Onedrive... or just upload the file to a site like tinyupload.com (no sign-up required).

     

    Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.