Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Power Query Parameter

Hello Everyone, 

I have a table in power query which came from two files from different quarter, this table will be split in two table to make a comparison and extract a delta of difference between two files after a full outer join.
I've created two parameters Reference_Quarter and Comparison_Quarter, this two parameters are used inside the two tables I've mention before. 
Is it possible to set these Parameters directly from Power Bi report as a slicer?

Let's say, I have all quarters in both parameters, and from slicers I will select the Reference one and the Comparison one.

 

Thanks in advance 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous ,

    Based on the description, power query parameter is a value and cannot be added to the slicer. The user can go through the parameters and filter the table data.

    But, you can achieve similar functionality using DAX.

    Add two slicers to the report and create the measure to store the selected quarters.

    Then, using the following DAX formula to filter the quarter.

    Measure = 
    var _quart = SELECTEDVALUE('Table'[Quarter])
    RETURN
    IF(_quart <= [ReferenceQuarter], "Reference", 
        IF(_quart <= [ComparisonQuarter], "Comparison")
    )

    You can also view the following document to learn more about Power Query Parameter.

    Parameters - Power Query | Microsoft Learn

     

    Best Regards,

    Wisdom Wu

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

2 Replies

  • Hey Anonymous 

    I think is not posible set PQ parameters directly from slicer in a report. However, you can achieve a similar result by using dax and slicers to perform comparisons dynamically within the Power BI report itself.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Based on the description, power query parameter is a value and cannot be added to the slicer. The user can go through the parameters and filter the table data.

    But, you can achieve similar functionality using DAX.

    Add two slicers to the report and create the measure to store the selected quarters.

    Then, using the following DAX formula to filter the quarter.

    Measure = 
    var _quart = SELECTEDVALUE('Table'[Quarter])
    RETURN
    IF(_quart <= [ReferenceQuarter], "Reference", 
        IF(_quart <= [ComparisonQuarter], "Comparison")
    )

    You can also view the following document to learn more about Power Query Parameter.

    Parameters - Power Query | Microsoft Learn

     

    Best Regards,

    Wisdom Wu

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