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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Variation real vs. real past year

Hi, I have the following problem.

 

My data look like this (comes from an Excel file):

 Captura.PNG

Through DAX y manage to get the value of the same date but from the period of the past year, so far the table on PBI look like this:

Captura 2.PNG

 

Now I want to aggregate a column with the variation in percentage but I am having trouble with how to do that.

 

Thanks !!

 

1 ACCEPTED SOLUTION

Hi @Anonymous,

Do.a simple.measure for.dolar

Dolar = SUM (Longitudinal[Dólar])

Add to your visial to.replace the current dolar column and the make the measure I indicated in previous post to make the variation.

Regards,
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
MFelix
Super User
Super User

Hi @Anonymous,

 

If the values you present here are two calculated measures you simply have to make something like this:

 

Variation = Divide( [Dólar] ; [Dolar Ano Ant]) -1

And then format as a  %, if this values are not measures you need to make them both as measures.

 

can you share the syntax for both values and of they are measures?

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Hi @MFelix

 

The column of "Dólar" it's the value from the data (the Excel file) meanwhile the column "Dolar Año Ant" it's a calculated measure with the following syntax:

 

Dolar Año Ant = CALCULATE(SUM(Longitudinal[Dólar]),SAMEPERIODLASTYEAR(Longitudinal[Fecha]))

 

Thanks !!

Hi @Anonymous,

Do.a simple.measure for.dolar

Dolar = SUM (Longitudinal[Dólar])

Add to your visial to.replace the current dolar column and the make the measure I indicated in previous post to make the variation.

Regards,
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Hi @MFelix.

 

It worked perfectly.

 

Thanks a lot.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.