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.
I have two dax functions that looks like this below:
Solved! Go to Solution.
Combine them how? Either/Or would be OR() or ||, And would be AND() or &&, or you could evalueate with an IF() statment to return one or the other.
If you want to add them, just put a + between them.
Otherwise, please explain your desired output.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting@edhans I want to nest the calculated columns together with OR statment but do not know how to do that.
Is this what you want?
New Column =
OR(
CALCULATE(
SUM( f_Kronos[Minutes] ) - "60",
FILTER(
f_Kronos,
f_Kronos[Subtraction Column] = "Subtract 60"
)
),
CALCULATE(
SUM( f_Kronos[Minutes] ) - "30",
FILTER(
f_Kronos,
f_Kronos[Subtraction Column] = "Subtract 30"
)
)
)
Without seeing your data or what you are doing, hard to know.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting@edhans This gives me True and False values only in place of the columns, I need to subtract 60 and 30 according to the conditional column that I have, in other terms, subtract 60 minutes from minutes column where minutes are more then or equal to 540, and subtract 30 from those where minutes are less then 540, I hope am able to explain you now.
Hi @Anmolgan
Please try the below measure
Measure 5 =
var _30=CALCULATE(sum(f_Kronos[Minutes]) - "30", FILTER(f_Kronos, f_Kronos[Subtraction Column]= "Subtract 30"))
var _60=CALCULATE(sum(f_Kronos[Minutes]) - "60", FILTER(f_Kronos, f_Kronos[Subtraction Column]= "Subtract 60"))
Return
IF(_30=-30,_30,_60)
If this helped you, please mark this post as an accepted solution and like to give KUDOS .
Regards,
Affan Farooqi
Below is the file where am trying to do this, check page 2 and measure 3 and measure 4
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 |
---|---|
112 | |
97 | |
82 | |
67 | |
61 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |