cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I

## Calculate totals per date

Hello,

I have 2 tables (see example)

First table contains tickets and a creation date.

Second table contains tickets and closed date.

I want to calculate the total created tickets minus the total closed tickets per date. This results need to be visulized in a graph.

How can I do this?

Thx

 Created Created Total 2020-01 Tic-1 2020-01 Tic-7 2020-01 1 2020-01 Tic-2 2020-02 Tic-8 2020-02 -1 2020-02 Tic-3 2020-02 Tic-9 2020-03 1 2020-03 Tic-4 2020-03 Tic-10 2020-04 -2 2020-03 Tic-5 2020-04 Tic-11 2020-03 Tic-6 2020-04 Tic-12

1 ACCEPTED SOLUTION
Resident Rockstar

Hi, @Foolke

take a look at this sample report I created based on your sample data, is it something like this you are after?

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

7 REPLIES 7
Community Support

Hi @Foolke

That would be helpful if you can provide the dummy pbix and the expected results in it.

you might refer to the similar posts here:

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

You can create a common time dimension and join it both dates. this not from your data. But check how to join two table with same date dim: https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0

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
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

In case they are inside same table, refer:https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges

Helper I

@amitchandak Thx for the reply. Unfortunately, the solution doesn't work. What am I doing wrong?

I created a date table, made relations. But when adding the visual it doesn't show the months on the X axis. (see scr1).

@v-diye-msft : goal uis to make the visual as in screenshot, but with the monyths displayed. The line in this 'line clusterd column graph" should give the difference between created and closed tickets.

Scr1

Super User

Dates have timestamp. And there where null rows. I created date columns and join

Resident Rockstar

Hi, @Foolke

take a look at this sample report I created based on your sample data, is it something like this you are after?

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

Helper I

Your sample report is excactly what I need.

Unfortunatly ... it doesn't work for me.

Resident Rockstar

If you look at you creation date and closed date, there is a time part, e.g. 01.10.2019 22:31:29. The values in the date table are only dates, or they are like this 01.10.2019 00:00:00, so you won't get a match between the two tables.

You can split these creation/closed date into two columns using power query, one with date, the other with time.

Or you can create a calculated column where you remove the timepart of the creation date:
new column = left(creation date;9)

Just remember to change the relationships to use the new column

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

#### Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors