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
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.

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.