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.
Hello everyone,
Need help in below expression....I have a measure called MTD FORMULA like this.
MTD FORMULA=IF(VALUE(MONTH(MaxDate)))='12' AND CEILING(DAY(MAXDATE/7),1)< CALCULATE(MAX(MaxNumOfPayWeeksInMonth),FILTER(FACT1, FACT1[MONTH] = "12/2019")),
CALCULATE(SUM(MID_MONTH_NET_AMOUNT), FILTER(FACT1, FACT1[MONTH] = "12/2019" && FACT1[WeekNum] = "<=2")),
CALCULATE(SUM(MTD_NET_AMOUNT), FILTER(FACT1, FACT1[MONTH] = "12/2019"))).
Now, i want to use this for other multiple measures as MTD FORMULA(12),MTD FORMULA(11)....I want the MTD FORMULA expression to be static and i should be able to pass arguments such as 12,11 etc...for this i need to have a variable in MTD FORMULA that will accept the arguments passed and replace the varuiable with value.
Please help me get out of this.
Thankyou
Hi @Anonymous ,
I think that you want to create a custom DAX function which has parameters. I am afraid that Power BI doesn't support it currently.
However you could use VAR to define some static formula like VAR a = SUM(MID_MONTH_NET_AMOUNT).
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
99 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |