Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hello,
I kindly request help with my problem.
I need to define a measure that will be multiplied by another measure if the value of another field is empty and the filtered field will no longer empty, but will have value.
Or if there is another way, maybe in power query or editing „Accounting_data“ by adding columns –or something else, I will be thankful.
I’ll try to explain more specifically.
I have for example accounting data in table „Accounting_data“:
Date | Label | RefCin | Value |
1.4.2022 | Marketing cost |
| 250,- |
6.6.2022 | Rent | 1 | 380,- |
5.5.2022 | Wages | 2 | 220,- |
7.7.2022 | Wages | 3 | 150,- |
1.2.2022 | Rent |
| 200,- |
3.3.2022 | IT services |
| 450,- |
4.4.2022 | Wages |
| 100,- |
Then I have measure „Percentage“ (counted from another table).
RefCin-percentage | Percentage |
1 | 15 % |
2 | 25 % |
3 | 60 % |
Here is the quest:
I need to make measure for every RefCin:
Result:
RefCin-percentage | Year costs |
1 | 380 + 0,15*(250+200+450+100) = 530 |
2 | 220 + 0,25*(250+200+450+100) = 470 |
3 | 150 + 0,6*(250+200+450+100) = 750 |
Solved! Go to Solution.
Hi @Verkana ,
My Data model:
M_Percentage = CALCULATE(SUM('Table'[Percentage]))
Measure:
Measure =
VAR _VALUE = CALCULATE(SUM(Accounting_data[Value]),FILTER(ALL(Accounting_data), Accounting_data[RefCin] =MAX('Table'[RefCin])))
VAR _BLANK = CALCULATE(SUM(Accounting_data[Value]),FILTER(ALL(Accounting_data), Accounting_data[RefCin] = BLANK()))
RETURN
_VALUE + [M_Percentage] * _BLANK
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Verkana ,
My Data model:
M_Percentage = CALCULATE(SUM('Table'[Percentage]))
Measure:
Measure =
VAR _VALUE = CALCULATE(SUM(Accounting_data[Value]),FILTER(ALL(Accounting_data), Accounting_data[RefCin] =MAX('Table'[RefCin])))
VAR _BLANK = CALCULATE(SUM(Accounting_data[Value]),FILTER(ALL(Accounting_data), Accounting_data[RefCin] = BLANK()))
RETURN
_VALUE + [M_Percentage] * _BLANK
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
74 | |
73 | |
56 | |
38 | |
31 |
User | Count |
---|---|
84 | |
63 | |
63 | |
49 | |
45 |