March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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:
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.
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!
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 Accumulati
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:
Date | Num. Of Account | Avg. Balance |
2016-01 | 203 | 1,11 |
2016-02 | 203 | 1,05 |
2016-03 | 203 | 0,99 |
2016-04 | 203 | 1,25 |
2016-05 | 203 | 1,99 |
2016-06 | 203 | 0,81 |
2016-01 | 405 | 45,4 |
2016-02 | 405 | 41 |
2016-03 | 405 | 40 |
2016-04 | 405 | 45 |
2016-05 | 405 | 50 |
2016-06 | 405 | 39 |
Based on this, the calculated measure 'Indicator A', and the corresponding measure 'Punctuation A' for each month is expected to be something like this:
Date | Indicator A | Punctuation A |
2016-01 | 2,44% | 0 |
2016-02 | 2,56% | 5 |
2016-03 | 2,48% | 0 |
2016-04 | 2,78% | 5 |
2016-05 | 3,98% | 5 |
2016-06 | 2,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.
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 ) )
@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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
89 | |
86 | |
77 | |
49 |
User | Count |
---|---|
164 | |
149 | |
101 | |
73 | |
56 |