cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
haybirt
New Member

calculations

hi 

 i have numbers with a date and i want to sum all numbers with its date or year 

example 2014/1/1 = 12

               2014/1/5 = 10

              2015/5/14 = 5

              2015/12/6 = 15

the mesure or (column) must show table like 

2014 = 22 

2015= 20

 

pleas help 

best regards, 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

from my understanding it's not necessary to create a calculated column or measure.

 

I just entered some sample data:

image.png

 

image.png

 

Then I checked if the data type of the Date column has been recognized as date or datetime (I almost switch to date every time). Please be aware that the Date Hierarchy will be created automatically. 

image.png

Adjust the format to your liking, the essential part is the data type

Then it's possible to create a visual just by dragging and dropping the columns to a table visual. This behavior is the standard behavior of Power BI.

image.png

 

If you want to create more advanced analytical reports it will become essential that you create a dedicated Calendar table, this article covers almost everything that is important for this: https://www.daxpatterns.com/time-patterns/

 

I attached the file to this post.

 

Regards,

Tom

 

If the Date Hierarchy is not created automatically this is how to turn this on:

image.png

Sooner or lated (often sooner it is a good idea to turn this option off), but for a start it is okay.

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
mussaenda
Super User
Super User

You cn use the quick measure for filtering your numbers by year.

TomMartens
Super User
Super User

Hey,

 

from my understanding it's not necessary to create a calculated column or measure.

 

I just entered some sample data:

image.png

 

image.png

 

Then I checked if the data type of the Date column has been recognized as date or datetime (I almost switch to date every time). Please be aware that the Date Hierarchy will be created automatically. 

image.png

Adjust the format to your liking, the essential part is the data type

Then it's possible to create a visual just by dragging and dropping the columns to a table visual. This behavior is the standard behavior of Power BI.

image.png

 

If you want to create more advanced analytical reports it will become essential that you create a dedicated Calendar table, this article covers almost everything that is important for this: https://www.daxpatterns.com/time-patterns/

 

I attached the file to this post.

 

Regards,

Tom

 

If the Date Hierarchy is not created automatically this is how to turn this on:

image.png

Sooner or lated (often sooner it is a good idea to turn this option off), but for a start it is okay.

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.