Forum Discussion
Calculated column & DAX for slicer issues.
- 4 years ago
Hi,
According to your description, I can roughly understand your requirement, I think you can try this DAX formula to achieve your requirement:
You can create the calculated column [Desc] like this:
Desc = IF( NOT(ISERROR(VALUE(LEFT('Slicer'[Period]))+1)),"Y", IF( NOT(LEFT('Slicer'[Period],1) in {"Q","W"}),"M", LEFT('Slicer'[Period],1)))And you can get what you want, like this:
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi matrix_user
Can you share a sample of your data table in a text format?
BTW, try this code to add a new column with dax:
New Column =
VAR _RW =
RIGHT ( Table[Period], 1 )
RETURN
IF ( _RW = "W", "W", IF ( _RW = 2, "Y", "M" ) )
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
- matrix_user4 years ago
Helper III
Sample I am trying to replicate
https://www.dropbox.com/s/je57x1drgndidmk/Dynamic%20Slicer.pbix?dl=0
My sample work
https://www.dropbox.com/s/8tq9iqnrkulm5t9/ScooterWorld.pbix?dl=0