Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
BarrilleauxAP
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

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
v-diye-msft
Community Support
Community Support

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.
jthomson
Solution Sage
Solution Sage

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

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!

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.

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.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.