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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Syndicate_Admin
Administrator
Administrator

Uso de múltiples variables en expresión

Hola a todos

He pasado por algunas de las publicaciones de este Foro y SQL BI con respecto al uso de varias variables en expresiones DAX.

Tengo el siguiente ejemplo donde quiero filtrar la tabla para varios criterios...

Test_Measure =
Var Res_2 = FILTER('M1 Notifications', ('M1 Notifications'[Created on] < (TODAY()-1825) && 'M1 Notifications'[Created on] > (TODAY()-365))
Var Res_1 = FILTER('M1 Notifications', ('M1 Notifications'[Notification System Status] = "Outstanding notification" || 'M1 Notifications'[Notification System Status] = "Order assigned" || 'M1 Notifications'[Notification System Status] = "Notification in process"))

RETURN
IF(COUNTROWS(Res_1) <> BLANK(),COUNTROWS(Res_1),UNICHAR((32))
)<div><span>First I want to filter the table for the dates and then for Notification Status. I am using two variables one after the other. <div><span>This code is not working... it says syntax for 'Var Res_1' is incorrect. <div>I tried to replace 'M1 Notifications' (table name) in the Var Res_1 formula with 'Res_2' since Res_2 is the filtered table for one set of conditions. This does not work either.<div>How can we use two variables on the same table in succession? <div>Maybe some expert will explain the logic behind the code so that I can understand the correct operation of these Variables.<div>Thank you<div>Krishna</div></div></div></div></div></span></div></span></div>

0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.