Forum Discussion
Raul
Post Patron
7 years agoConvert a measure into M language
Hey guys,
I have create this measure:
Col. Renda = IF(LEFT(SELECTEDVALUE(RendaSocietats[Concepte Renda]);5)="FFG01";LOOKUPVALUE(ServeisClients[Colaborador];ServeisClients[CodServei];"REN";ServeisClients[CodClient];SELECTEDVALUE(RendaSocietats[CodClient]));BLANK())
But I can't use a slicer for a measure to filter a matrix visualization. I need to convert this measure into a calculated column but I don't know how translate it into M language:
Col. Renda = if Text.Start(RendaSocietats[Concepte Renda],5) = "FFG01" , LOOKUPVALUE(ServeisClients[Colaborador];ServeisClients[CodServei];"REN";ServeisClients[CodClient];SELECTEDVALUE(RendaSocietats[CodClient])) else ""
How is the correct statement?
Thank you very much and Merry Christmas!!
Hi Raul,
You don't have to use the M. You can use the calculated column instead. Please refer to the snapshot below. The formula could be like below, which is also the DAX.
Col. Renda = IF ( LEFT ( RendaSocietats[Concepte Renda]; 5 ) = "FFG01"; LOOKUPVALUE ( ServeisClients[Colaborador]; ServeisClients[CodServei]; "REN"; ServeisClients[CodClient]; RendaSocietats[CodClient] ); BLANK () )Best Regards,
Dale
2 Replies
- v-jiascu-msft
Microsoft Employee
Hi Raul,
You don't have to use the M. You can use the calculated column instead. Please refer to the snapshot below. The formula could be like below, which is also the DAX.
Col. Renda = IF ( LEFT ( RendaSocietats[Concepte Renda]; 5 ) = "FFG01"; LOOKUPVALUE ( ServeisClients[Colaborador]; ServeisClients[CodServei]; "REN"; ServeisClients[CodClient]; RendaSocietats[CodClient] ); BLANK () )Best Regards,
Dale- Raul
Post Patron
Thank you vey much v-jiascu-msft,
It's simple, that it's.