Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
16 | |
8 | |
7 | |
7 | |
6 |
User | Count |
---|---|
23 | |
11 | |
10 | |
10 | |
8 |