Forum Discussion
Two different filters based on Row value
- Anonymous2 years ago
Hi bignadad
You can try to create a MEASURE to categorize your [USER] column using the IF function or the Switch function.
Then use the Filter function to filter each.
Links of other DAX functions you may use:
DAX overview - DAX | Microsoft Learn
For example, I create a set of sample:
Then create a measure:
Measure = IF( SELECTEDVALUE('Table'[user])="C", MAX('Table'[Column1]), //when [user] = C, the matrix show [column1] MAX('Table'[Column2]) //If [user] not equal to C, the matrix show [column2] )The result is as follow:
You can also try the field parameter.
Fields parameter is a feature that allows users to choose which column to use to slice values in a Power BI visual.
For example, by creating a fields parameter you can very easily build a report where you can slice by Brand and Category, as in the following figure.
Links of how to use field parameter:
Fields parameters in Power BI - SQLBI
Best Regards,
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi bignadad
You can try to create a MEASURE to categorize your [USER] column using the IF function or the Switch function.
Then use the Filter function to filter each.
Links of other DAX functions you may use:
DAX overview - DAX | Microsoft Learn
For example, I create a set of sample:
Then create a measure:
Measure = IF(
SELECTEDVALUE('Table'[user])="C",
MAX('Table'[Column1]),
//when [user] = C, the matrix show [column1]
MAX('Table'[Column2])
//If [user] not equal to C, the matrix show [column2]
)
The result is as follow:
You can also try the field parameter.
Fields parameter is a feature that allows users to choose which column to use to slice values in a Power BI visual.
For example, by creating a fields parameter you can very easily build a report where you can slice by Brand and Category, as in the following figure.
Links of how to use field parameter:
Fields parameters in Power BI - SQLBI
Best Regards,
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- bignadad2 years ago
Helper I
I am trying to implement the measure with if then you suggested.
I tried this buts its not working
Measure = IF(SELECTEDVALUE(warehouseEntry[user])="PICK",FILTER(warehouseEntry,warehouseEntry[entryType] = "Negative Adjmt."),FILTER(warehouseEntry,warehouseEntry[entryType] = "SHIP"))I didn't include it above but there are multiple conditions that need to be met.If user = PICK then entryType = "Negative Adjmt." and Zone Code = "SHIP"elseBin Code = SHIP|Consumption and entryType = Movement.How can that be implemented in your suggestion?