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
hettoritosi
Frequent Visitor

Accumulated Sum by month and semester

Hi guys, I need a help here, I have the following problem:

JAN 10
FEB 10
MAR 10
APR 10

MAY 10
JUN 10
JUL 10
AUG 10


I have a month slicer

When I select  March

I'd like this result: 30

But When I select July, I'd like this result: 20

 

Anyone could help me please?

1 ACCEPTED SOLUTION
v-danhe-msft
Employee
Employee

Hi @hettoritosi ,

Could you have a date column? If you have a date column, you could refer to below steps:

Create a calculated column:

Legend = IF([Date].[MonthNo]<6,1,2)

1.PNG

Create a measure:

Measure = CALCULATE(SUM(Table1[Value]),FILTER(ALL(Table1),'Table1'[Date]<=SELECTEDVALUE(Table1[Date])&&'Table1'[Legend]=MAX('Table1'[Legend])))

Result:

2.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
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

4 REPLIES 4
v-danhe-msft
Employee
Employee

Hi @hettoritosi ,

Could you have a date column? If you have a date column, you could refer to below steps:

Create a calculated column:

Legend = IF([Date].[MonthNo]<6,1,2)

1.PNG

Create a measure:

Measure = CALCULATE(SUM(Table1[Value]),FILTER(ALL(Table1),'Table1'[Date]<=SELECTEDVALUE(Table1[Date])&&'Table1'[Legend]=MAX('Table1'[Legend])))

Result:

2.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
edhans
Super User
Super User

Why is march 30 and july 20?



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Cause the semester, i need to sum from Jan to Jun  and  Jul to Dec. 

Then you will need to add data to your table that shows that Jan-Jun are in semester 1, and Jul-Dec are in Semester 2. In Power Query, just add a Semester column that says:

each if [Month] <= 6 then 1 else 2

Then any SUM() function in DAX on those values would split if you had the Semeseter column visible in the visual.

 

You need a date table to do this right.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.