Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
12 | |
10 | |
9 | |
8 |
User | Count |
---|---|
16 | |
15 | |
15 | |
12 | |
10 |