Forum Discussion

DataSpace's avatar
DataSpace
Icon for Helper II rankHelper II
2 years ago
Solved

How to display default rows in Table/Matrix visual even after Slicers applies to the table data

I am trying my best to replicate the data with actual scenario here. I have data in table DS_main as shown in below snippet:       In case you want to copy, below is same data in text form...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  DataSpace ,

     

    Here are the steps you can follow:

    1. Create measure.

    Flag =
    var _selectcity=SELECTEDVALUE('City'[CityID])
    var _selectuser=SELECTEDVALUE('User'[UserID])
    return
    IF(
        OR(
        MAX('Table'[UserID]) =_selectuser && MAX('Table'[CityID])=_selectcity ,
        MAX('Table'[UserID]) ="DefaultUser" && MAX('Table'[CityID])="DefaultCity"),1,0
    )

    2. Place [Flag]in Filters, set is=1, apply filter.

    3. Result:

     

     

    Best Regards,

    Liu Yang

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