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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors