Forum Discussion
Measurement Time out
- 4 years ago
WaelTalaat79 change your measure to this:
YTD Prog. Rebates Value = VAR _Yearly_Purchases_Value = [Yearly Purchases Value] VAR _slab = [Slab-#] VAR _result = SWITCH( _slab, 0, 0, 1, SUM ( '2022 P-Rebates Slab Condition %'[Slab % 1] ), 2, SUM ( '2022 P-Rebates Slab Condition %'[Slab % 2] ), 3, SUM ( '2022 P-Rebates Slab Condition %'[Slab % 3] ), 4, SUM ( '2022 P-Rebates Slab Condition %'[Slab % 4] ), 5, SUM ( '2022 P-Rebates Slab Condition %'[Slab % 5] ), 6, SUM ( '2022 P-Rebates Slab Condition %'[Slab % 6] ) ) * _Yearly_Purchases_Value RETURN _result - 4 years ago
My Savior 😍
it just 5 seound "OMG , love you man"
ok that is encourge me to ask for mor 2 measure related
i need to get the monthly impacy by sbtruct the current month value - previous month
but when i do it the calcoulation consider the previous month od Jan is DEC. with value but dec. should be zeroPR for PreivMonth =(CALCULATE([YTD PR Calculate],PREVIOUSMONTH('Date'[Date].[Date])))
and the Yearly purchases is a column calcoulation to get the purchases from another table source
WaelTalaat79 change your measure to this:
YTD Prog. Rebates Value =
VAR _Yearly_Purchases_Value = [Yearly Purchases Value]
VAR _slab = [Slab-#]
VAR _result =
SWITCH(
_slab,
0, 0,
1, SUM ( '2022 P-Rebates Slab Condition %'[Slab % 1] ),
2, SUM ( '2022 P-Rebates Slab Condition %'[Slab % 2] ),
3, SUM ( '2022 P-Rebates Slab Condition %'[Slab % 3] ),
4, SUM ( '2022 P-Rebates Slab Condition %'[Slab % 4] ),
5, SUM ( '2022 P-Rebates Slab Condition %'[Slab % 5] ),
6, SUM ( '2022 P-Rebates Slab Condition %'[Slab % 6] )
) * _Yearly_Purchases_Value
RETURN
_result
- WaelTalaat794 years agoHelper I
My Savior 😍
it just 5 seound "OMG , love you man"
ok that is encourge me to ask for mor 2 measure related
i need to get the monthly impacy by sbtruct the current month value - previous month
but when i do it the calcoulation consider the previous month od Jan is DEC. with value but dec. should be zeroPR for PreivMonth =(CALCULATE([YTD PR Calculate],PREVIOUSMONTH('Date'[Date].[Date])))- SpartaBI4 years agoCommunity Champion
WaelTalaat79 my pleasure my friend 🙂
For community visabilty better to open a new thread per question, so open a new one and I'll try to get to it. Need to leave PC for now
And hey, check out my showcase report:
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up if you liked it 🙂