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
asmagh
Helper I
Helper I

calculate 2 amount in different periode

hello , i have a probleme to calculate 2 amount in 2 different periode.
Infact , I would like to create a report (a table) which displays for each article in a first column the quantity of the current stock and the second column contains the amount of its sale of the previous year or the last 6 months. so to summarize, I would like to have 2 information each for a specific date in the same table. Is it possible ? If yes, how
thank you.

3 REPLIES 3
v-yulgu-msft
Employee
Employee

Hi @asmagh,

 

Based on my assumption, I created below sample table.

1.PNG

 

Please new a calculated table.

result table =
SUMMARIZE (
    table3,
    table3[Article],
    "Current Y", CALCULATE (
        SUM ( table3[Sales] ),
        FILTER ( table3, table3[Date].[Year] = YEAR ( TODAY () ) )
    ),
    "Previous Y", CALCULATE (
        SUM ( table3[Sales] ),
        FILTER ( table3, table3[Date].[Year] = YEAR ( TODAY () ) - 1 )
    )
)

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

heyy , thank you for your response , however it's not what i want ,infact , i want to fix a column on the current year and another column on a different year and different periode 

Hi @asmagh,

 

Please share your sample data and show the image of desired output.

 

How to Get Your Question Answered Quickly

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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.