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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
erhan_79
Post Prodigy
Post Prodigy

Calculating Rate

Hi there ;

 

İ would like to calculate below issue could you pls help me , let me explain pls sceneraio  first : 

 

i have a table as below which one you can see at left below ; i would like to calculate the rate " Customer Qty "of report for last day on report .

Customer Qty (counted ) on status "Actual Monh " total and between "Actual Month + Next Month " Total  ,

 

 

i tried to explain below picture what i need , i hope it is clear , thanks in advance for your kind supports 

Capture-17.JPG

 

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @erhan_79 

Give this a try.

Rate = 
VAR _Date = MAX ( YourTable[Report Date] )
VAR _Act = CALCULATE ( COUNTROWS(YourTable), YourTable[Report Date] = _Date, YourTable[Status] = "Actual Month" )
VAR _ActNext = CALCULATE ( COUNTROWS(YourTable), YourTable[Report Date] = _Date )
RETURN 
DIVIDE ( _Act, _ActNext )

2020-06-21_6-58-17.png 

View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

Please try this expression in a measure:

 

NewMeasure =
VAR __maxdate =
    MAX ( Table[Report Date] )
VAR __maxdatetable =
    FILTER ( Table, Table[Report Date] = __maxdate )
VAR __actualmonthcount =
    COUNTROWS ( FILTER ( __maxdatetable, Table[Status] = "Actual Month" ) )
VAR __nextmonthcount =
    COUNTROWS ( FILTER ( __maxdatetable, Table[Status] = "Next Month" ) )
RETURN
    DIVIDE ( __actualmonthcount, __actualmonthcount + __nextmonthcount )

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





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

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


jdbuchanan71
Super User
Super User

Hello @erhan_79 

Give this a try.

Rate = 
VAR _Date = MAX ( YourTable[Report Date] )
VAR _Act = CALCULATE ( COUNTROWS(YourTable), YourTable[Report Date] = _Date, YourTable[Status] = "Actual Month" )
VAR _ActNext = CALCULATE ( COUNTROWS(YourTable), YourTable[Report Date] = _Date )
RETURN 
DIVIDE ( _Act, _ActNext )

2020-06-21_6-58-17.png 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors