Forum Discussion

ebrownretail's avatar
ebrownretail
Resolver I
1 year ago
Solved

Input Snow Range

Hi!

I am trying to find what my snow range is based on the weekly history snow totals. Currently, this is not filling in. Can you please help figure out what to do or whats wrong? I need to take this info for my next step in the analytics process.

 

Here is my measure:

Find Range history =
CALCULATE(SELECTEDVALUE('Weather Range'[Snow Range]),FILTER('Weather Range', 'Weather Range'[Snow] = [Weekly totals]))
 

Here is what my table says to find what the snow range is:

SnowSnow Range
00
11-3
21-3
31-3
44-8
54-8
64-8
74-8
84-8

 

I have the weekly snow totals below:

Store NumberWeek NumberSnow TotalSnow Range
12023491 
12023506 
12024034 
  • So i just figured it out by thinkging of a Vlookup in excel and was able to get it to work!

     

    Find Range history =
    LOOKUPVALUE('Weather Range'[Snow Range], 'Weather Range'[Snow], [Weekly totals])

5 Replies

  • Join the tables in your data model via the Snow/Snow Total columns.  Then you get the Range for free.

    • ebrownretail's avatar
      ebrownretail
      Resolver I

      i need it to be the specified range as sales work differently based on different snow amounts.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi All
        Firstly  lbendlin thank you for your solution!
        And ebrownretail ,you can try the treatas function, it should be able to accomplish your needs, you can filter the snowrange according to snowtotal, I hope my solution is helpful to you, I will be honored if I can solve your problem!

        Measure = CALCULATE(
        MAX('Table (2)'[Snow Range]),TREATAS(VALUES('Table'[Snow Total]),'Table (2)'[Snow]))

        Hope it helps!

        Best regards,
        Community Support Team_ Tom Shen

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

         

         

  • So i just figured it out by thinkging of a Vlookup in excel and was able to get it to work!

     

    Find Range history =
    LOOKUPVALUE('Weather Range'[Snow Range], 'Weather Range'[Snow], [Weekly totals])