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
kritpatel
Regular Visitor

Count Product sub category group by Monthwise

Hello Experts,

Need some advise on how to calculate product subcategory fall in every month.

for e.g -Fter(Category 2) is unique for ED-4,(Category 1) which comes manytime in month in Sales table stored by Category 3 & 4.

 

Here i wanted Category 2 - fall under month (it should be count as 1 if in Jan'18 there are 5 no of sales transaction issued by category 3/4) & for Feb 1,

 

so output

Month - Category 2

Jan'18 - 2 Fter

Jan'18 - 1 Ster

Feb'18 - 4 Fter

Feb'18 - 2 Ster

 

Category ICategory IICountryCustomerCategory IIICategory IVMonthRevenue
 ED-4  Fter  Nigeria V1Packages - Others1001Jan-18              65
 WE  Fter  Angola  EM1 Packages - Others1001Jan-18              72
 Base  Shef  Congo  PCO Packages - Others1002Jan-18           150
 ED-4  Fter  Nigeria V1Packages - Others1004Feb-18           182
 WE  Fter  Angola  EM1 Packages - Others1001Jan-18           182
MV Fter  Ghana E1STE1006Jan-18           240
MV Fter  Ghana E1Packages - Others1009Jan-18           300
 WC  Fter  Gabon OPPackages - Others1005Jan-18           300
 Base  Shef  Congo  PCO Packages - Others1004Jan-18           350
 U22  Shef  Congo E1Packages - Others1101Feb-18           360
 D12  Fter   Senegal   KE Packages - Others1006Jan-18           365
 U22  Shef  Congo E1Packages - Others1006Jan-18           390
1 REPLY 1
v-cherch-msft
Employee
Employee

Hi @kritpatel

 

It's not clear about your sample and expected output. It caused me confused. Here are some references for you.

 

https://community.powerbi.com/t5/Desktop/Sum-of-distinct-counts-over-filtered-months/td-p/319378

https://www.daxpatterns.com/budget-patterns/

 

Regards,

Cherie

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

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.