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
Anonymous
Not applicable

Grouping the results of a measure by category ( Date, Shipping Lane, Supplier#, Sales Center#)

I would like to see if someone can help me. I want to be able to get a shipment count grouped by the following categories,

 

Carrier Pickup date, supplier#, sales center #, and shipping lane... I've been able to calculate and group the shipments with no issues however i can't seem to figure out how to apply filters to the results... i have some shipments which have not been picked up so the date is blank and i want to filter only grouped results that are greater than 1 indicatiting that there is an opportunity for shipment consolidation.

 

Here was my first attempt... i get results howeve i want to be able to filter by shipments > 1 and ignore those blank values in the carrier picked up column.

 

CALCULATE(
DISTINCTCOUNT(SupplyChainReportTMC[TMC Load]),
GROUPBY(
SupplyChainReportTMC,
SupplyChainReportTMC[Carrier PU Date],
Vendor_Listing[Vend#],
SupplyChainReportTMC[Lane],
SupplyChainReportTMC[Branch #]))


1 ACCEPTED SOLUTION
Anonymous
Not applicable

I've actually come up with a different solution for the problem.. i've aggregated the data in Power Query and filtered out occurances greater than 1.

 

For the "Same Week" extracted the week of the year and GroupBy that column to get that count.

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 


Could you please tell me whether your problem has been solved?
If it is,  please mark the helpful replies or add your reply as Answered to close this thread.
More people will learn new things here. If you haven't, please feel free to ask.

 

Best Regards,
Community Support Team _ Eason

Anonymous
Not applicable

I've actually come up with a different solution for the problem.. i've aggregated the data in Power Query and filtered out occurances greater than 1.

 

For the "Same Week" extracted the week of the year and GroupBy that column to get that count.

NamishB
Post Prodigy
Post Prodigy

Hi @Anonymous - Have you tried something like :

 

CALCULATE(
DISTINCTCOUNT(SupplyChainReportTMC[TMC Load]),
<Filter_Column with value>,
GROUPBY(
SupplyChainReportTMC,
SupplyChainReportTMC[Carrier PU Date],
Vendor_Listing[Vend#],
SupplyChainReportTMC[Lane],
SupplyChainReportTMC[Branch #]))
 
I am not too sure if this with work with groupby clause. If you can share sample data
 
if this helps.
 
Cheers,
-Namish B

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.