Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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.
User | Count |
---|---|
84 | |
76 | |
63 | |
51 | |
45 |
User | Count |
---|---|
101 | |
43 | |
39 | |
39 | |
36 |