Forum Discussion
Formatting based on condition DAX
- 6 years ago
Seems like it should be along the lines of:
Column = IF([Attribute] = "REVENUE",CONVERT([Value,CURRENCY),[Value])
Hi,
Well when I tried it it didnt change to text, it kept it as numerical:
I have run few check and the table on the right has been created with the formula mentionned above and it is correct. There are two things I dont know how to solve though:
1) Add a delimeter " , " as per the left example
2) When I drag and drop my measure into my matrix which as Month & Period in Drill down, the entire calendar I use for my model appears. When I select date range, only data for the date range appear but the rest of the month doesnt dissapear as it will normally do.
I hope I am making sense for point 2.
Thank you
I hope the second point make sense.
- corange6 years agoPost Patron
Hi Greg_Deckler ,
Thanks for pointing this out. I see it now.
Any idea how I would be able to use CONVERT() and obtain the same results? How write something around those lines using CONVERT():
IF ATTRIBUTE = REVENUE THEN VALUE = CURRENCY, ELSE VALUE = "" meaning not symbol.
Thank you
- Greg_Deckler6 years agoCommunity Champion
Seems like it should be along the lines of:
Column = IF([Attribute] = "REVENUE",CONVERT([Value,CURRENCY),[Value])