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

LTM in column

Good

I have a little doubt I would want to transform a measure into a calculated column but it does not give me the expected values:

Total acumulado de Horas Curso en ID_PERIODO = 
CALCULATE(
 SUM('FORMACION'[Horas Curso]);
 FILTER(
  ALLSELECTED('Maestra Fechas'[FECHA]);
  'Maestra Fechas'[FECHA] in DATESINPERIOD('Maestra Fechas'[FECHA_PERI]; MAX('Maestra Fechas'[FECHA]);-12; MONTH
)))


My column is:

Columna=
CALCULATE(
 SUM('FORMACION'[Horas Curso]);
 FILTER(
  ALLSELECTED('Maestra Fechas'[FECHA]);
  'Maestra Fechas'[FECHA] in DATESINPERIOD('Maestra Fechas'[FECHA]; MAX('Maestra Fechas'[FECHA]);-12; MONTH
)))


The result is as follows:
Screenshot_8.png
Why don't the same values appear in my column that I should put to make it the same?

9 REPLIES 9
amitchandak
Super User
Super User

@Anonymous , your formula seems fine. But it should a measure not column.


Example measures

Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD(Table[Date],ENDOFMONTH(Sales[Sales Date]),-12,MONTH))
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD(Table[Date Filer],MAX(Sales[Sales Date]),-12,MONTH))

Anonymous
Not applicable

I know my measurement is fine, I put the photograph to be observed. I want that measure turned into a column

Icey
Community Support
Community Support

Hi @Anonymous ,

 

Try this:

Columna =
CALCULATE (
    SUM ( 'FORMACION'[Horas Curso] );
    FILTER (
        ALLSELECTED ( 'Maestra Fechas'[FECHA] );
        'Maestra Fechas'[FECHA]
            IN DATESINPERIOD (
                'Maestra Fechas'[FECHA_PERI];
                'Maestra Fechas'[FECHA];
                -12;
                MONTH
            )
    )
)

 

If it doesn't work, please share me a dummy pbix file for test, only with necessary part, removing sensitive information and replacing real data with dummy data. It is suggested to upload your file to OneDrive for Business and then paste the link here.

 

 

Best Regards,

Icey

 

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

Anonymous
Not applicable

I give you the test pbix
pbix


Icey
Community Support
Community Support

Hi @Anonymous ,

 

Why do you want to convert it to column? In your Matrix visual, 'Hoja1'[ID_PERIODO] is one filter context. But in your column, the context is missing. So, the column value is not the same as measure.

 

 

Best Regards,

Icey

 

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

Anonymous
Not applicable

I want to convert it to column because of that LTM for this reason because I want to perform that operation, and with a measure does not allow me, so how much I need to perform an LTM on a column and filter

Screenshot_18.png

Anonymous
Not applicable

para  despues  agruparlo  por el numero que  obtenga  como  resultado:
1-8
9-16
17-32
+32

Anonymous
Not applicable

Thank you but that's what's on my post as a measure and it's the same as in the hahaha column. the results are shown in the image.

Icey
Community Support
Community Support

Hi @Anonymous ,

 

Well.. It is suggested to share me a dummy pbix file or some dummy data for test.

 

 

Best Regards,

Icey

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.