Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have a Clients table like this and I want to filter the customers by the "Active" and "Credit" columns, so that only "Active" = "OK" or "Credit" = "OK" customers are selected for the slicer, according to the selected option.
Then, I want to select one client and put some sales information in to visuals.
I dont know how to filter my clients by "Active" or "Credit" so I can select only clients of that type.
(Edited: when I selected "credit", only customers with "credit" = "OK" would be available for the customer slicer, and when I selected "active", only customers with "credit" = "OK" would be available for the customer slicer, then I could choose the desired customer and present his data in visuals)
Any tip is very appreciated
Richard
Solved! Go to Solution.
Hi @RGCP ,
You will need to create a new table with column "type" as below.
Then create measures as below.
is_active = IF(SELECTEDVALUE('Table'[active])="ok",1,0)
is_credit = IF(SELECTEDVALUE('Table'[credit])="ok",1,0)
Measure = SWITCH(SELECTEDVALUE(slicer[type]),"active",[is_active],"credit",[is_credit])
You could add the [measure] to visual level filter.
Best Regards,
Jay
Hi @RGCP ,
You will need to create a new table with column "type" as below.
Then create measures as below.
is_active = IF(SELECTEDVALUE('Table'[active])="ok",1,0)
is_credit = IF(SELECTEDVALUE('Table'[credit])="ok",1,0)
Measure = SWITCH(SELECTEDVALUE(slicer[type]),"active",[is_active],"credit",[is_credit])
You could add the [measure] to visual level filter.
Best Regards,
Jay
Hello @RGCP ,
You can try this approach:
Create a new calculated colum with the below code:
FlagOK = if(OR(ClientsTable[Active] = "OK",ClientsTable[Credits]),"OK", Blank())
You cna then use this slicer and filter the OK records
Hello @PC2790 than you for suggestion, but what I wanted was when I selected "credit" only customers with "credit" = "OK" would be available for the customer slicer, and when I selected "active" only customers with "credit" = "OK" would be available for the customer slicer, then I could choose the desired customer and present his data in visuals
Maybe I had not explained myself correctly, sorry about that.
Thanks,
Richard
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |