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.
Hi guys,
I have calculated the proportional target up to the day before today, but I would like to calculate this proportional target for 6 months, up to June.
is a calculated column
Solved! Go to Solution.
You can try the following code.
MetaProporcional =
VAR dia =
SUMX (
FILTER (
'Calendário',
'Calendário'[Data] >= '01. Meta'[Primeiro dia]
&& 'Calendário'[Data] <= '01. Meta'[Ultimo dia]
&& 'Calendário'[mês] = '01. Meta'[Mês]
&& 'Calendário'[ano] = '01. Meta'[Ano]
&& 'Calendário'[mês] >= 1
&& 'Calendário'[mês] <= 6
),
'Calendário'[DIaUtil]
)
VAR metaproporcional =
DIVIDE ( '01. Meta'[Meta], dia )
* SUMX (
FILTER (
'Calendário',
'Calendário'[Data] >= '01. Meta'[Primeiro dia]
&& 'Calendário'[Data]
<= TODAY () - 1
&& 'Calendário'[mês] = '01. Meta'[Mês]
&& 'Calendário'[ano] = '01. Meta'[Ano]
&& 'Calendário'[mês] >= 1
&& 'Calendário'[mês] <= 6
),
'Calendário'[DIaUtil]
)
RETURN
metaproporcional
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can try the following code.
MetaProporcional =
VAR dia =
SUMX (
FILTER (
'Calendário',
'Calendário'[Data] >= '01. Meta'[Primeiro dia]
&& 'Calendário'[Data] <= '01. Meta'[Ultimo dia]
&& 'Calendário'[mês] = '01. Meta'[Mês]
&& 'Calendário'[ano] = '01. Meta'[Ano]
&& 'Calendário'[mês] >= 1
&& 'Calendário'[mês] <= 6
),
'Calendário'[DIaUtil]
)
VAR metaproporcional =
DIVIDE ( '01. Meta'[Meta], dia )
* SUMX (
FILTER (
'Calendário',
'Calendário'[Data] >= '01. Meta'[Primeiro dia]
&& 'Calendário'[Data]
<= TODAY () - 1
&& 'Calendário'[mês] = '01. Meta'[Mês]
&& 'Calendário'[ano] = '01. Meta'[Ano]
&& 'Calendário'[mês] >= 1
&& 'Calendário'[mês] <= 6
),
'Calendário'[DIaUtil]
)
RETURN
metaproporcional
Best Regards!
Yolo Zhu
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 |
---|---|
58 | |
56 | |
56 | |
38 | |
29 |
User | Count |
---|---|
75 | |
62 | |
45 | |
40 | |
39 |