cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
treeclauses
Frequent Visitor

I need to bring the value of "Total Dotación" of the previous month

 
 

Hi,

I need to bring the value of "Total Dotación" of his respective "Rol" and "UN" in a different column.

example:

if the date of "Fecha"Marzo de 2019, "UN" EIIC and "Rol" ROL GENERAL is 333, I need in a different column the value of Febrero de 2019, 285. 

 

2020-04-16 12_18_33-Sin título - Power BI Desktop.png

I would greatly appreciate your help.

1 ACCEPTED SOLUTION

Hi @treeclauses ,

Yes, we can sum a column and a measure. You could try like this:

Measure 2 =
VAR total =
    SUMX ( 'Table', 'Table'[Total Dotación] + [Measure] )
RETURN
    DIVIDE ( total, 2 )

If you don't want to do a calculation while the measure is blank, you could try this:

Measure 3 =
VAR total =
    SUMX ( 'Table', 'Table'[Total Dotación] + [Measure] )
RETURN
    IF ( ISBLANK ( [Measure] ), BLANK (), DIVIDE ( total, 2 ) )

3.PNG

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xuding-msft
Community Support
Community Support

Hi @treeclauses ,

Please try like this:

  • Create a calendar table
Date = CALENDAR(MIN('Table'[Fecha]),MAX('Table'[Fecha]))
  •  Create a measure
Measure = CALCULATE(SUM('Table'[Total Dotación]),DATEADD('Date'[Date],-1,MONTH))

4.PNG

And there are many different ways to implement it. You also could reference the videos  to have a try.

https://www.youtube.com/watch?v=-xBYtOVyMTs

https://www.youtube.com/watch?v=s4HsdoSTNt4

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

it works! thanks! @v-xuding-msft 

 

now, if i wanna sum the two values, and divide on 2, how can i do it? can i sum a column with a measure?

 

 

Hi @treeclauses ,

Yes, we can sum a column and a measure. You could try like this:

Measure 2 =
VAR total =
    SUMX ( 'Table', 'Table'[Total Dotación] + [Measure] )
RETURN
    DIVIDE ( total, 2 )

If you don't want to do a calculation while the measure is blank, you could try this:

Measure 3 =
VAR total =
    SUMX ( 'Table', 'Table'[Total Dotación] + [Measure] )
RETURN
    IF ( ISBLANK ( [Measure] ), BLANK (), DIVIDE ( total, 2 ) )

3.PNG

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!