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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Vinod_P
Helper I
Helper I

Supply vs demand

Below is the sameple data and looking for demand( Count of values in demand date column) & Supply (Count of values in the supply date column) , Looking at a view to compare both counts like 1-1 against the fixed jan to dec month on X-axis.

ID NUMBERPart numberCUSTOMERCUST REQ DATEEST. FORECAST DELIVERY
11Vinod 17/08/202212/01/2023
21Vinod 17/08/202204/05/2023
31Vinod 17/08/202227/01/2023
41Vinod 17/08/202205/04/2023
52Vinod 01/02/202220/01/2023
62Vinod 01/02/202220/01/2023
72Vinod 01/02/202220/01/2023
82Vinod 01/02/202220/01/2023
92Vinod 01/02/202210/03/2023
102Vinod 01/02/202228/02/2023
112Vinod 01/02/202210/03/2023
122Vinod 01/02/202205/04/2023
132Vinod 27/04/202220/01/2023
141Vinod 21/10/202205/04/2023
151Vinod 21/10/202205/04/2023
161Vinod 21/10/202217/04/2023
171Vinod 21/10/202204/05/2023
181Vinod 21/10/202217/04/2023

Expecting outcome is as below

Vinod_P_0-1683034446836.png

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Vinod_P ,

 

Please try:

First create a calendar table:

vjianbolimsft_0-1683168491237.png

Then create a matrix visual and apply these measures:

Demand = CALCULATE(COUNT('Table'[Part number]),FILTER('Table',[CUST REQ DATE]<=EOMONTH(MAX('Calendar'[Date]),0)&&[CUST REQ DATE]>EOMONTH(MAX('Calendar'[Date]),-1)))

Supply = CALCULATE(COUNT('Table'[Part number]),FILTER('Table',[EST. FORECAST DELIVERY]<=EOMONTH(MAX('Calendar'[Date]),0)&&[EST. FORECAST DELIVERY]>EOMONTH(MAX('Calendar'[Date]),-1)))

LOB = [Demand]-[Supply]

vjianbolimsft_1-1683168566329.png

Switch values to rows:

vjianbolimsft_2-1683168603480.png

Final output:

vjianbolimsft_3-1683168627597.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @Vinod_P ,

 

Please try:

First create a calendar table:

vjianbolimsft_0-1683168491237.png

Then create a matrix visual and apply these measures:

Demand = CALCULATE(COUNT('Table'[Part number]),FILTER('Table',[CUST REQ DATE]<=EOMONTH(MAX('Calendar'[Date]),0)&&[CUST REQ DATE]>EOMONTH(MAX('Calendar'[Date]),-1)))

Supply = CALCULATE(COUNT('Table'[Part number]),FILTER('Table',[EST. FORECAST DELIVERY]<=EOMONTH(MAX('Calendar'[Date]),0)&&[EST. FORECAST DELIVERY]>EOMONTH(MAX('Calendar'[Date]),-1)))

LOB = [Demand]-[Supply]

vjianbolimsft_1-1683168566329.png

Switch values to rows:

vjianbolimsft_2-1683168603480.png

Final output:

vjianbolimsft_3-1683168627597.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi , 

 

Thanks a lot for the solution. Need one more small add to the below report

 

Want to add Opening stock = previous month closing ,  for the first month it will be "0" 

 

Below screenshot FYR

Vinod_P_0-1684246846949.png

 

Please help

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.