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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
iamJL
Regular Visitor

Rolling 3 month Running Total value and get hit rate with Dax or ...?

I need to get hit rate, I wrote a measure but it seems like too much data to show in the BI matrix table..

all my data is about 30,000 rows, data structure is like excel picture

maybe someone can solve it with better solution...?

 

2025-01-21 105916.png

step 1: rolling total qty evey 3 months GROUP BY SALES AND PARTNO IN TABLE A AND B
step 2: new_ship_qty/new_forcast_qty*100% ---> get hit rate.

 

TABLE A

salespartmoForcast_QTYYYMMDD
Harris00A12023/12/1
Harris00A22024/1/1
Harris00A32024/2/1
Harris00A42024/3/1
Harris00A32024/4/1
Harris00B52024/1/1
Harris00B12024/2/1
Harris00C62024/1/1
Harris00C72024/2/1
Harris00C42024/3/1
Harris00C12024/4/1
Harris00C52024/5/1
Harris00C62024/6/1
Albee00A92023/12/1
Albee00A72024/1/1
Albee00A82024/2/1
Albee00A82024/3/1
Albee00B82024/2/1
Albee00B42024/3/1

 

---->

NEW TABLE A

salespartmoNEW_Forcast_QTYYYMMDD
Harris00A12023/12/1
Harris00A32024/1/1
Harris00A62024/2/1
Harris00A92024/3/1
Harris00A102024/4/1
Harris00B52024/1/1
Harris00B62024/2/1
Harris00C62024/1/1
Harris00C132024/2/1
Harris00C172024/3/1
Harris00C122024/4/1
Harris00C102024/5/1
Harris00C122024/6/1
Albee00A92023/12/1
Albee00A162024/1/1
Albee00A242024/2/1
…....   

 

 

TABLE B 

salespartmoShip_QTYYYMMDD
Harris00A32023/12/1
Harris00A22024/1/1
Harris00A52024/2/1
Harris00A62024/3/1
Harris00A62024/4/1
Harris00B72024/1/1
Harris00B22024/2/1
Harris00C102024/1/1
Harris00C92024/2/1
Harris00C62024/3/1
Harris00C72024/4/1
Harris00C32024/5/1
Harris00C3

2024/6/1

   

 

 

---->

 

NEW TABLE B

salespartmoNEW_Ship_QTYYYMMDD
Harris00A32023/12/1
Harris00A52024/1/1
Harris00A102024/2/1
Harris00A132024/3/1
   
1 REPLY 1
bhanu_gautam
Super User
Super User

@iamJL First, create measures to calculate the rolling 3-month total for both forecast and ship quantities.

 

RollingForecastQTY =
CALCULATE(
SUM('TableA'[Forcast_QTY]),
DATESINPERIOD('TableA'[YYMMDD], LASTDATE('TableA'[YYMMDD]), -3, MONTH)
)

 

RollingShipQTY =
CALCULATE(
SUM('TableB'[Ship_QTY]),
DATESINPERIOD('TableB'[YYMMDD], LASTDATE('TableB'[YYMMDD]), -3, MONTH)
)

 

Next, create a measure to calculate the hit rate based on the rolling totals.

HitRate =
DIVIDE(
[RollingShipQTY],
[RollingForecastQTY],
0
) * 100

 

 

Add the HitRate measure to your BI matrix table to visualize the hit rate over time.

 

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.