Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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!
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
18 | |
17 | |
17 | |
16 |
User | Count |
---|---|
28 | |
27 | |
18 | |
14 | |
14 |