Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a measure created by as following:
cumulative good=CALCULATE(sum(table[good]),FILTER(ALLSELECTED(table),table[Custom Score Gains (bins)] <= max(table[Custom Score Gains (bins)])))
Herer is table:
I would like to create a new measure which is the reserve order of measure cumulative good. So it will start value 345768 at frist bin 387. Then the second bin value will be 345118. ............................ and the last bin value would be 2. How I can I create such measure ?
Thanks,
Solved! Go to Solution.
I get it working .Thanks guys
Cumulative good(cbr)2 = CALCULATE(sum(tracking_data_combined2[good]),FILTER(ALLSELECTED(tracking_data_combined2),tracking_data_combined2[FICO_BIN] <= MAX(tracking_data_combined2[FICO_BIN])))
measure 3 =
Var RANK_desc =
RANKX (
ALLSELECTED ( table[FICO_BIN] ),
[Cumulative good(cbr)1],
,
DESC
)
return
CALCULATE(sum(table[good]),TOPN (RANK_desc, SUMMARIZE(ALLSELECTED( table),table[FICO_BIN],"total good",sum(table[good]))table[FICO_BIN],ASC))
Hi, please try with this: **Adapt the measure to your scenario.
Measure = VAR Category = SELECTEDVALUE ( Table1[Category] ) VAR CategoriesTotal = CALCULATE ( DISTINCTCOUNT ( Table1[Category] ); ALL ( Table1 ) ) VAR Categoriesbefore = CALCULATE ( DISTINCTCOUNT ( Table1[Category] ); FILTER ( ALL ( Table1 ); Table1[Category] < Category ) ) VAR CategoriesAfter = CategoriesTotal - Categoriesbefore RETURN CALCULATE ( SUM ( Table1[Value] ); TOPN ( CategoriesAfter; ALL ( Table1 ); Table1[Category]; ASC ) )
Regards
Victor
THanks Victor. I tried your solution but still can't get it to work. Do you know why ?
Measure =
VAR Category =
SELECTEDVALUE ( tracking_data_combined2[FICO_BIN] )
VAR CategoriesTotal =
CALCULATE ( DISTINCTCOUNT ( tracking_data_combined2[FICO_BIN] ), ALLSELECTED(tracking_data_combined2 ) )
VAR Categoriesbefore =
CALCULATE (
DISTINCTCOUNT ( tracking_data_combined2[FICO_BIN] ),
FILTER ( ALLSELECTED( tracking_data_combined2 ), tracking_data_combined2[FICO_BIN]<Category) )
VAR CategoriesAfter = CategoriesTotal - Categoriesbefore
RETURN
CALCULATE (
SUM ( tracking_data_combined2[good]),
TOPN ( CategoriesAfter, ALLSELECTED( tracking_data_combined2),tracking_data_combined2[FICO_BIN], asc)
)
Anyone knew how to create such measure ?
Maybe cumulative good2=SUM(table[good])-CALCULATE(sum(table[good]),FILTER(ALLSELECTED(table),table[Custom Score Gains (bins)] <= max(table[Custom Score Gains (bins)])))
Thanks for your reply. Not really working
I am not sure. But give it a shot.
First create these RANK MEASURES
RANK Asc = RANKX ( ALLSELECTED ( 'Table'[Custom Score Gains (bins)] ), [cumulative good], , ASC )
RANK Desc = RANKX ( ALLSELECTED ( 'Table'[Custom Score Gains (bins)] ), [cumulative good], , DESC )
Using the above RANK measures... you might get the good column in reverse order using this MEASURE
Reverse good = VAR myrank = [RANK Asc] RETURN CALCULATE ( SUM ( 'Table'[good] ), FILTER ( ALLSELECTED ( 'Table'[Custom Score Gains (bins)] ), [RANK Desc] = myrank ) )
Then you can cumulate this ReverseGood measure
Could you share your file?
I will look into it
I get it working .Thanks guys
Cumulative good(cbr)2 = CALCULATE(sum(tracking_data_combined2[good]),FILTER(ALLSELECTED(tracking_data_combined2),tracking_data_combined2[FICO_BIN] <= MAX(tracking_data_combined2[FICO_BIN])))
measure 3 =
Var RANK_desc =
RANKX (
ALLSELECTED ( table[FICO_BIN] ),
[Cumulative good(cbr)1],
,
DESC
)
return
CALCULATE(sum(table[good]),TOPN (RANK_desc, SUMMARIZE(ALLSELECTED( table),table[FICO_BIN],"total good",sum(table[good]))table[FICO_BIN],ASC))
Thanks for your reply Muhammad.
Here is the snapshot after I implemented your code. In my data, there is a few bins Dont have any obs in it
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |