Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Brenoo
Regular Visitor

Compound Fees

YEARMONTHPREVIOUS VALUEVALUERENDREND%REND TOTAL %

2018

JAN

R$ 1.685.515,06R$ 1.667.048,37R$ 6.533,310,39% 
2018FEVR$ 1.667.048,37R$ 1.615.559,21R$ 7.911,800,49% 
2018MARR$ 1.615.559,21R$ 1.623.287,84R$ 7.728,630,48% 
2018APPRR$ 1.623.287,84R$ 1.630.633,74R$ 7.345,900,45% 
2018MAYR$ 1.630.633,74R$ 1.638.727,03R$ 8.093,290,50% 
2018JUNR$ 1.638.727,03R$ 1.646.867,14R$ 8.140,110,50% 

 

Hello, here is my problem: 

1. PREVIOUS VALUE, VALUE, REND, REND% are MEASURES.

2. For REND TOTAL % I need to copound the fees from REND%. 

 

Since PRODUCT X only works with table, how do I do that with a measure?

3 REPLIES 3
PaulOlding
Solution Sage
Solution Sage

Hi @Brenoo 

The table you'd want to iterate in your PRODUCTX is the YEAR and MONTH columns included in the visual.

The ALLSELECTED function gives you the filters applied to the visual as a whole.

So, something like the below, that uses a Date table with Year, Month and YearMonth columns:

REND TOTAL % = 
VAR _YearMonths = 
FILTER(
    ALLSELECTED('Date'[Year],'Date'[Month], 'Date'[YearMonth]),
    'Date'[YearMonth] <= MAX('Date'[YearMonth])
)
VAR _Result = 
PRODUCTX(
    _YearMonths,
    [REND%]
    )
RETURN
    _Result

 

PaulOlding_0-1657919666362.png

 

If I link my original Power bi file and a Excell data may you help me? I really need this calc for my report.

Thanks

Hello, first of all, thanks for your help. I forgot to let you know that Date Year and Date Month are colums from a Calendar Table that is related to a colum "DATE" type on the table INVEST. Tried to addapted your code to:

Rend_Total % = VAR _YearMonths =
FILTER(
ALLSELECTED(CALENDARIO[Date].[Date]),
CALENDARIO[Date].[Date] <= MAX('INVEST MOV'[DATA])
)
VAR _Result =
PRODUCTX(_YearMonths, [Rend %])
RETURN
_Result

It did not work.

here are all my code related to [Rend%]

Rend % = CALCULATE(
DIVIDE([Rend], Medidas[Saldo_Rend], 0),
'INVEST MOV'[DATA]
)

Saldo_Rend = CALCULATE(
Medidas[Saldo]-[Rend],
'INVEST MOV'[DATA]
)

Rend = CALCULATE(
Medidas[Saldo]-Medidas[Aplic]-Medidas[Aporte]-Medidas[Resgate]-Medidas[Liquidado]-Medidas[Saldo_Ant],
'INVEST MOV'[DATA]
)

 

Saldo = CALCULATE(
SUM('INVEST MOV'[VALOR]),
MOVTIPO[Movtipo.Nome]="SALDO"
)

 

For the rest of measueres Aplic, Aporte, Resgate, Liquidado, Saldo_Ant is the same as above just changing the filter MOVTIPO[Movtipo.Nome]="SALDO" to each.

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.