March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Dear, good afternoon!
I need some help with the DAX formula.
I have a formula that already calculates correctly every month, but I need this formula to be divided in two ways, being:
The current formula calculates until 09/2022 and the new one I created ignore the previous one and start considering from 10/2022 onwards the new formula for the next few months.
Just adding the need. I thought of a formula with the "IF", Example: IF d'calenadario is smaller 30/09/2022 will use formula A, otherwise it will use formula B. Something like that.
Could someone help me assemble this formula?
Please.
Att.
Robson
Solved! Go to Solution.
Hi @AndradeRobson ,
Use selectedvalue() to wrap the date column.
Measure C = IF(selectedvalue(calendar[date])<=date(2022,9,30),[Measure A],[Measure B])
Hi @AndradeRobson ,
Use selectedvalue() to wrap the date column.
Measure C = IF(selectedvalue(calendar[date])<=date(2022,9,30),[Measure A],[Measure B])
Hi @AndradeRobson ,
Measure C = IF(calendar[date]<=date(2022,9,30),[Measure A],[Measure B])
IF I misunderstood your meaning, please share some sample data and expected result.
Best Regards,
Jay
Good evening!
Thanks for the feedback.
The function you sent I just didn't understand this calendar[date] field, because when I put IF it doesn't call dcalendario.
I'll put more details, being:
I have two formulas in dax, one to calculate data up to 09/30/2022 and another current formula to calculate from 10/01/2022.
I need a function that when created can apply these two variables
Example of the forms I have:
40_Difereca_Horas_=
"This calculation from 01/10/2022 onwards"
var current_function = CALCULATE([07_Difference_Horas_Contradas_Segurança])
"This calculates to 30/09/2022
var previous_function =
CALCULATE([24_Difference_Hours_Security])
Att.
Robson
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |