Forum Discussion

Analystdata's avatar
Analystdata
Frequent Visitor
2 years ago
Solved

Toggle values of the table

Hi Everyone! I am reaching out to seek assistance with implementing a slicer in Power BI. The objective is to create a slicer with values 0 and 1, where selecting 0 will hide entire rows where the s...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Thanks for the reply from ray_aramburo , please allow me to provide another insight:
    Hi,ray_aramburo 

    Regarding the issue you raised, my solution is as follows:

    1.First I have created the following table and the column names and data are the data you have given:

     

    2. Below are the measure I've created for your needs:

     

    Measure = 
    VAR SELCET=SELECTEDVALUE(CHOICE[Column1])
    RETURN IF(SELCET=0,IF(CALCULATE(SUM('Table'[Column3]),FILTER(ALLSELECTED('Table'),'Table'[Column1]=MAX('Table'[Column1])))=0,1,0),1)
    

     

    3.Add mesure to the filtered view:

    4.Here's my final result, which I hope meets your requirements.

    Best Regards,

    Leroy Lu

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