Forum Discussion

KarenFingerhut's avatar
KarenFingerhut
Responsive Resident
1 year ago
Solved

Percentage Slicer (slider)

Hi there Community    I hope someone can help me please   I have a granular level dataset going down to component level. To get the percentages of total adjusted I do the below calc   Firstly c...
  • KarenFingerhut's avatar
    KarenFingerhut
    1 year ago

    Hi Gao

     

    I've now resolved the issue. 

     

    I wrote some SQL to get a percentage distinct datset and created the numbers from 0.01 to 100.

     

    I then created a % adjusted measure in my main dataset components[% Adjusted] by using these columns CALCULATE([# Total Adjusted]/[# Total Components] )

     

    I then created a measure (see below) based on some of the responses to this thread (thank you everyone)

     

    % Adjusted For Slider Link =
    VAR sliderstart = MIN(percentagelist[% Adjusted]) - this is from my SQL dataset
    VAR sliderend = MAX(percentagelist[% Adjusted])  - this is from my SQL dataset
    VAR result = components[% Adjusted]  - this is from my main dataset
    RETURN
    IF( result >= sliderstart && result <= sliderend, result+0)
     
    I then added percentagelist[% Adjusted] to each of my tables as well as to the slider . 
     
    Works a treat.
     
    Hope makes sense
     
    Thank you everyone. Great team work ğŸ˜Š
     
    Kind regards
    Karen