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
Hi all,
Im looking for a solution to my problem. I want to do some divide with two statements in denominator like:
Solved! Go to Solution.
Hey @Anonymous ,
do you use it as a calculated column or as a measure?
As you wrote it the first post it looked like a calulcated column. Then my formula should work. If you use it as a measure, you have to add an aggregation. Then the following should work:
MyMeasure =
DIVIDE(
COUNTROWS( 'Invoices' ),
IF(
MAX( 'Invoices'[Team] ) = "A",
9,
10
)
)
The formula dosent work. Can it be due to the fact that my refference column (Team) is a Custom made column with formula inside?
Hey @Anonymous ,
yes, that's absolutely possible.
The following approach should work:
MyMeasure =
DIVIDE(
COUNTROWS( 'Invoices' ),
IF(
'Invoices'[Team] = "A",
9,
10
)
)
You could also put it in a variable if you want to, but here that is not necessary:
MyMeasure =
VAR vIfValue =
IF(
'Invoices'[Team] = "A",
9,
10
)
RETURN
DIVIDE(
COUNTROWS( 'Invoices' ),
vIfValue
)
The formula dosent work. Can it be due to the fact that my refference column (Team) is a Custom made column with formula inside?
@selimovd do you maybe know, why it is not working? I cant do reference to a column in this part of your code:
IF( 'Invoices'[Team] = "A", 9, 10
I can make after IF(... reference to another formula or measure....
Hey @Anonymous ,
do you use it as a calculated column or as a measure?
As you wrote it the first post it looked like a calulcated column. Then my formula should work. If you use it as a measure, you have to add an aggregation. Then the following should work:
MyMeasure =
DIVIDE(
COUNTROWS( 'Invoices' ),
IF(
MAX( 'Invoices'[Team] ) = "A",
9,
10
)
)
Thanks! It works!
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 |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |