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

Get total of multiple months and show per month

Hi everyone,

 

I've got the following data:

DatekeyValue
202001011000
202002011000
202003011500
202004011500
20200501750
202006011000

 

The timestamp is linked to a separate date table.

 

Based on that I currently have a chart with a running total (1000, 2000, 3500, 5000, ...) and a monthly value (exactly what is shown in the table above).

 

However, I would like to show the sum of the values for every month, based on the time-filter i'm using on the dashboard.

So let's say i'm filtering on Q1 2020. then in the chart I would want to see:

jan-2020 - 3500

feb-2020 - 3500

mar-2020 - 3500

 

How can I achieve that?

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Spekko 

Your measure will have to be like:


Measure = Calculate ( sum(table[sales]) , allselected(Date[MonthYear])

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Spekko , create a date table move your qtr, month, year filter there. and then try a measure like example with month (from date table) and check

 

example

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[date])))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

 

Fowmy
Super User
Super User

@Spekko 

Your measure will have to be like:


Measure = Calculate ( sum(table[sales]) , allselected(Date[MonthYear])

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.