Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Raul
Post Patron
Post Patron

Convert 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!!
1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
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 ()
)

Convert-a-measure-into-M-language

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
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 ()
)

Convert-a-measure-into-M-language

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you vey much @v-jiascu-msft,

It's simple, that it's.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors