Forum Discussion

sobm_1092's avatar
sobm_1092
Regular Visitor
2 years ago
Solved

Dynamic Calculation based on the slicer selection

I am new to Power BI and I am stuck with this problem.

 

I have a dataset that has multiple columns. I want to create two slicers based on a single column `ID`, One is Base and the other is Reference, Based on user preferences of Base & Reference Slicer, I want to calculate the difference of Count and the calculation will be plotted as line/bar graph. Here ID Column can have multiple values, Here I have shown only 2 values. 

I am facing a problem with the slicer, If I select a value in the Base Slicer, the same value is also shown in the Reference Slicer, and the difference of count based on the slicer values.

YearBatch GroupTypeIDCount
2020A1ScienceGoldA1-20205
2020A1CommerceGoldA1-20204
2020A1ArtsGoldA1-20205
2020A1ScienceSilverA1-202012
2020A1CommerceSilverA1-20203
2020A1ArtsSilverA1-20204
2020A1SciencePlatinumA1-20205
2020A1CommercePlatinumA1-20206
2020A1ArtsPlatinumA1-20201
2020A2ScienceGoldA2-20202
2020A2CommerceGoldA2-20204
2020A2ArtsGoldA2-20205
2020A2ScienceSilverA2-20203
2020A2CommerceSilverA2-20201
2020A2ArtsSilverA2-20204
2020A2SciencePlatinumA2-20205
2020A2CommercePlatinumA2-20205
2020A2ArtsPlatinumA2-20206

8 Replies

    • sobm_1092's avatar
      sobm_1092
      Regular Visitor

      Thanks a lot. Is it possible to do with slicer, cause there is multiple values in the ID column, like A1-2020, A1-2021, A1-2022, A2-2020, A2-2021, A2-2022. From there user can select which one they want as a base and which one they want as reference. 

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Slicer is what i have used on the page.  I have done it with a single slicer.  The user can select any 2 options in the single slicer.