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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
tahechadv_2022
Helper II
Helper II

How to calculate cumulative inflation iterating over two variables from a different table?

Hi guys! Due to data privacy, I won't be able to show you all the data, but I selected the relevant tables and variables.

 

I need to calculate the cumulative inflation in a dynamic period, in order to acomplish it, I need the 2 following variables from "table_1":

  1.  _date
  2.  moeda_correcao_ve

These 2 variables are in the "table_1", I need to iterate over each row.

- filter the period, the variable "_date" will be used as a filter to another table ("table_2", column: "data_lancamento"), example: _date >= 2020-09-18, I will take this period and filter "table_2".

- filter the "moeda_correcao_ve", it will be used as an argument filter for the "table_2" in the column "sigla".

 

"table_1"

tahechadv_2022_1-1666635435853.png

 

"table_2"

tahechadv_2022_0-1666635127525.png

These tables are not linked, but they can be linked by "sigla = moeda_correcao_ve" or "_date = data_lancamento".

 

Using the "table_1.moeda_correcao_ve" to filter "table_2.sigla" and "table_1._date" to filter "table_2.sigla", I will be able to sum the column "table_2.percentual". With this value, I will be able to calculate the inflation over the a certain value.

 

Resuming, I need to iterate over the "table_1" (over "moeda_correcao_ve" and "_date") to filter the table_2, and sum up the column "percentual".

The _date needs to filter ">=" and moeda_correcao_ve need to be "=", whether it is IPCA, IGPM...

1 REPLY 1
Anonymous
Not applicable

Hi @tahechadv_2022 ,

I'm a little confused about your needs, Could you please explain them further? 

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_ Binbin Yu

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors