Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Get the value in Power Query from Slicer Selection

Hello All,

I am integrated on slicer to get the month's date.... its is dynamically to follow this link : https://www.powerquery.training/portfolio/dynamic-calendar-table/

I want to Slicer selected value parse to my power query link :
let
    StartDate="Selected Vaule from Slicer",

------So i can use this value to my query.--------
in
    StartDate

Please let me know if you guys have any solution about this senario...

Thanks in advance.

Pankil

  • Hi Anonymous,

    Based on what I know, we can't get the selected value from slicer in Query Editor. I suggest you can use parameter. Please use the slicer column to create a list in Query Editor, and add the parameter as start date as follows.

    = List.Dates(Parameter1,100, #duration(1,0,0,0))


    In Power BI desktop, please click the Edit Queries->Edit parameter, you will select different value in parameter list, the table start date will change after you click "Apply changes"

    step1
    step2
    result
    Reference: POWER BI DESKTOP QUERY PARAMETERS, PART 1


    Best Regards,
    Angelia

1 Reply

  • v-huizhn-msft's avatar
    v-huizhn-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

    Based on what I know, we can't get the selected value from slicer in Query Editor. I suggest you can use parameter. Please use the slicer column to create a list in Query Editor, and add the parameter as start date as follows.

    = List.Dates(Parameter1,100, #duration(1,0,0,0))


    In Power BI desktop, please click the Edit Queries->Edit parameter, you will select different value in parameter list, the table start date will change after you click "Apply changes"

    step1
    step2
    result
    Reference: POWER BI DESKTOP QUERY PARAMETERS, PART 1


    Best Regards,
    Angelia