cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Two aggregations on the same table

I am new to Power BI although I have used other reporting packages. 

 

I have a single table that has two date columns, CreateDate & ShipDate.  What i am trying to acheive is a bar graph that shows a range of days calculating the net difference (each day) between the number (count) of records shipped minus the number (count) of records created.  The ShipDate is null until the record is shipped.  A sample of a few rows from the table is included below.

 

Thanks in advance for the help!

 

 

Sample of TableSample of Table

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Regular Visitor

Re: Two aggregations on the same table

I got this to work.  What i had to do was change the count function into calcuate and add UseRelationship.  All good!  Thanks for the help!

View solution in original post

5 REPLIES 5
Highlighted
Solution Sage
Solution Sage

Re: Two aggregations on the same table

This sort of thing is easiest if you make a date table to use as your bar graph axis, then make an active relationship to the createdate and an inactive relationship to the shipdate. It's then just a case of two measures - one counting the rows, and another counting the rows using the alternative relationship. Take one from the other, job done

Highlighted
Regular Visitor

Re: Two aggregations on the same table

I had tried that but i suspect there is an issue with the way i am counting the rows.  I am using COUNT(PickList[Create]) and COUNT(PickList[ShipDate]) however i get the same total for each date in the series.

Highlighted
Regular Visitor

Re: Two aggregations on the same table

I created a new, seperate date table and pointed the two dates as you suggested and i an still seeing an aggregate that is the same for all days.

Highlighted
Community Support
Community Support

Re: Two aggregations on the same table

Hi @BarrilleauxAP 

 

Kindly refer to the official documents for more hints about aggregation:

https://docs.microsoft.com/en-us/power-bi/desktop-aggregations 

 

 

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.
Highlighted
Regular Visitor

Re: Two aggregations on the same table

I got this to work.  What i had to do was change the count function into calcuate and add UseRelationship.  All good!  Thanks for the help!

View solution in original post

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors