Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All,
Maybe it's obvious,
But I've tried several methods (measure slicer), filter on this visual, etc and I haven't found a solution.
How can I filter this visual for:
- no sales 2022, sales 2021
- no sales 2022, sales 2020
- no sales 2022, sales 2019
Expected Result:
Regards and Tanks !
Solved! Go to Solution.
@AH2022 , you could create a measure to implement the logic to determine whether or not to show a customer in the matrix. For example:
ShowRowInMatrix =
VAR v2022 = CALCULATE('Data'[Total Sales], ALL('_Date'), '_Date'[Year] = 2022)
VAR v2021 = CALCULATE('Data'[Total Sales], ALL('_Date'), '_Date'[Year] = 2021)
VAR v2020 = CALCULATE('Data'[Total Sales], ALL('_Date'), '_Date'[Year] = 2020)
VAR v2019 = CALCULATE('Data'[Total Sales], ALL('_Date'), '_Date'[Year] = 2019)
RETURN
SWITCH(TRUE(),
ISBLANK(v2022) && v2021 <> 0, "Y",
ISBLANK(v2022) && v2020 <> 0, "Y",
ISBLANK(v2022) && v2019 <> 0, "Y",
"N"
)
Then add the measure as to the filters pane on the matrix and set the filter for values Y.
Rows that meet the criteria will be shown.
@AH2022 , you could create a measure to implement the logic to determine whether or not to show a customer in the matrix. For example:
ShowRowInMatrix =
VAR v2022 = CALCULATE('Data'[Total Sales], ALL('_Date'), '_Date'[Year] = 2022)
VAR v2021 = CALCULATE('Data'[Total Sales], ALL('_Date'), '_Date'[Year] = 2021)
VAR v2020 = CALCULATE('Data'[Total Sales], ALL('_Date'), '_Date'[Year] = 2020)
VAR v2019 = CALCULATE('Data'[Total Sales], ALL('_Date'), '_Date'[Year] = 2019)
RETURN
SWITCH(TRUE(),
ISBLANK(v2022) && v2021 <> 0, "Y",
ISBLANK(v2022) && v2020 <> 0, "Y",
ISBLANK(v2022) && v2019 <> 0, "Y",
"N"
)
Then add the measure as to the filters pane on the matrix and set the filter for values Y.
Rows that meet the criteria will be shown.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 17 | |
| 10 | |
| 7 | |
| 6 |