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

Accumulating the semester punctuation of a measure - Performance evaluation of banking agencies

Hi! I'm relatively new on Power BI and would be pleased if someone could help me solve a problem i'm struggling with on the performance evaluation dashboard of the bank agencies of the institution I work in Brazil.

 

I have an indicator that is calculated by dividing the month average balance of two different accounts and it works fine:

Spoiler

Indicator A =
SUMX( FILTER( 'PerformanceIndicators'; 'PerformanceIndicators'[Num. of Account] = 203 ; 'PerformanceIndicators'[Avg. Balance])
/
SUMX( FILTER( 'PerformanceIndicators'; 'PerformanceIndicators'[Num. of Account] = 405 ; 'PerformanceIndicators'[Avg. Balance])

 

I also have another measure to the corresponding punctuation of this indicator, that's hereafter weighted among others to compute the final punctuation of the agency. It works as well.

 

Spoiler
Punctuation A = IF( [Indicator] < 0,0025 ; 0 ; 5)


The problem is on accumulating the monthly punctuations over the last semester. I tried building a measure using some formulas such as CALCULATE with MAX, DATEADD or TOPN but I must have made some mistakes and it was not succesfull. I thought that maybe I could create a calculated column for the punctuation instead of a measure once I have a Date column on the same table.

 

Every help is welcomed. Thanks a lot!

 

5 REPLIES 5
v-huizhn-msft
Employee
Employee

Hi @romulotd,

Based on my understanding, there is date column including mutiple months in your resource data table, right? If it is, the two measures calculate all month's Punctuation for two different accounts. 

For your requirement, you want to calculate the Accumulating Punctuation for the two different accounts, right? If it is, please try the following formula to create calculate column.

Accumulating=CALCULATE(PerformanceIndicators[Punctuation A],FILTER(PerformanceIndicators,PerformanceIndicators[date]<=MAX(PerformanceIndicators[date])))



If this is not what you want, please share your sample data and list expected result, so we can post workaround clearly. 


Best Regards,
Angelia

 

@v-huizhn-msft thanks a lot for your help.

 

Yes, there is a date column including multiple months in my resource data table.

 

About the measure, I might haven't been clear enough. The measure is the division of the two accounts, there are not two indicators.

 

My requirement is to accumulate the punctuation over the last semester, not for every month that is lower than the maximum, as you suggested. Specifically, I want to sum the punctuation of the last 6 months.

 

Let me show with numbers the expected result, because my english is not so good. Here is my resource data table:

 

DateNum. Of AccountAvg. Balance
2016-012031,11
2016-022031,05
2016-032030,99
2016-042031,25
2016-052031,99
2016-062030,81
2016-0140545,4
2016-0240541
2016-0340540
2016-0440545
2016-0540550
2016-0640539

 

Based on this, the calculated measure 'Indicator A', and the corresponding measure 'Punctuation A' for each month is expected to be something like this:

 

DateIndicator APunctuation A
2016-012,44%0
2016-022,56%5
2016-032,48%0
2016-042,78%5
2016-053,98%5
2016-062,08%0

 

Until there, my code works, but when I try to accumulate the punctuation (sum the monthly values), where I expected to get a 15 (0+5+0+5+5+0), I get a 0. The code is aggregating the hole semester into a single value of the indicator (in this case 2,76%) and returns me the punctuation of this aggregated measure. 

 

Do you know how can I reach this? Thanks a lot for your time.

@romulotd

 

hi, Use this in the measure 

 

Indicator A =
DIVIDE (
    CALCULATE (
        SUM ( Table1[Avg. Balance] ),
        FILTER ( Table1, Table1[Num. Of Account] = "203" )
    ),
    CALCULATE (
        SUM ( Table1[Avg. Balance] ),
        FILTER ( Table1, Table1[Num. Of Account] = "405" )
    )
)
Punctuation A =
SUMX ( VALUES ( Table1[Date] ), IF ( [Indicator A] < 0,025, 0, 5 ) )



Lima - Peru

@Vvelarde and @v-huizhn-msft Thanks for the support and sorry about the delay, I couldn't focus on my BI project the last weeks. 

 

The solutions didn't work already.

 

The measures for Indicator and Punctuation are fine separately, but what I need is to accumulate the punctuation over the semester (sum the last 6 monthly punctuations).

 

It might be something simple, but I couldn't solve.

 

I appreciate your effort.

 

 

Hi @romulotd

Have you resolved your issue, if you have. Please mark corresponding reply as answer, and welcome to share your own solution. more people will benefit from it.

Best Regards,
Angelia

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.