Forum Discussion
Need Help On Slicer
Hi
I created a measure using the parameters below and add background colour. My question is I need to create a slicer with the same parameters but measure will not allow it.
Any help will be appreciated
//tksnota
Percentage> 1, "Greater Than 100%",
Percentage > 65% & Percentage < 99%, "Action Needed",
Percentage > 55% & Percentage < 64%, "Monitor The Account"
- Anonymous1 year ago
No, you can try it, and if you have any questions, feel free to post in the forum.
Best Regards,
Stephen Tao
7 Replies
- Muhammad_AhmedHelper I
Hi,
You cannot create a slicer with a measure. Slicers require calculated columns or tables. Create a calculated column with the same logic and use that for the slicer. - AnonymousNot applicable
i created a calculated table and used it as slicer filter and maintain the measure on the comment to check if filter will be the same as the measure.
this is the dax i created as shown.
SWITCH (TRUE (),'[PO_Percentage] > 1, "Greater Than 100%",'[PO_Percentage] ] > 0.65 && '[PO_Percentage] < 0.9999, "Action Needed",'[PO_Percentage] > 0.55 && '[PO_Percentage] < 0.6499, "Monitor The Account",'[PO_Percentage] < 0.5499, "")However the filter is not exactly matching with the measure comment as seen from the screenshots. Am I doing something wrong? btw.. the percentage is a measure and not a calculated column...
For this screenshot, how can I add to my dax if the percentage is negative then comment is "???"
//tksnota
- AnonymousNot applicable
Hi Anonymous ,
Thanks for reaching out to our community.
Here's my workaround.
Since you can't put a measure into a slicer, you can create a table contains Comment_PO values as the slicer's field.
I created this table by entering data.
Create a measure as the visual level filter. Put the measure into the table visual filters and set up show items when the value is 1. The slicer is created from the Table (2).
Measure = IF(ISFILTERED('Table (2)'[Comment_PO Type]),IF([Comment_PO] in ALLSELECTED('Table (2)'[Comment_PO Type]),1),1)Here's the result of the slicer filtering.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Thanks. It worked.
Is it possible to edit the DAX to include the blanks to show 4 categories?
What will be the DAX if the Categories will be 5 or more?
//tksnota
- AnonymousNot applicable
Really glad to help you.
Yes, it is possible. If you have blanks, it would be better to replace blanks with text "blank" in power query first.
In this way, you can add text blank in it.
If possible, please accept the helpful reply as solution. More people will benefit from it.
Best Regards,
Stephen Tao