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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

wrong summarization of measures

 

MeseRank index.Zona CommittenteBusinessValoreKindFirst CharactersCustomMonthProduct hierarchy
GIUGNOVENDITE S/C ITALIASENSORI (SENSORS)€ 1.520.000,00F'CST -0Jun2301-Jun-23SC12SE30507
AGOSTOVENDITE S/C ITALIASENSORI (SENSORS)€ 650.000,00F'CST -1Aug2301-Aug-23SC12SE30507
GIUGNOVENDITE S/C ITALIASENSORI (SENSORS)€ 1.560.000,00F'CST -1Jun2301-Jun-23SC12SE30507
SETTEMBREVENDITE S/C ITALIASENSORI (SENSORS)€ 1.650.000,00F'CST -2Sep2301-Sep-23SC12SE30507
AGOSTOVENDITE S/C ITALIASENSORI (SENSORS)€ 525.000,00F'CST -2Aug2301-Aug-23SC12SE30507
GIUGNOVENDITE S/C ITALIASENSORI (SENSORS)€ 1.560.000,00F'CST -2Jun2301-Jun-23SC12SE30507
         
         
         

Hi,

 

i'm working on a table where I have to collect different version of a forecast and store just the last updated, which, on a rolling month base, is suppose to be updated .

To do this i've written this measure 

FCST* = var FCST0=calculate(sum(FCST[Valore]),FCST[Kind]="F'CST 0")
        var FCST1=calculate(sum(FCST[Valore]),FCST[Kind]="F'CST -1")
        var FCST2=calculate(sum(FCST[Valore]),FCST[Kind]="F'CST -2")
    return
    if(not(ISBLANK(FCST0)),FCST0,
                                if(not(isblank(FCST1)),FCST1,
                                                            if(not(isblank(FCST2)),FCST2,0)))

The issue is that this is not able to correctly summarize at a quarter level as, if a month doesn't have the latest relaease of the forecast it doesn't consider the FCST-1 as alternative value to be consider.

in the database I have actually just the FCST0 over July but not for Aug and Sept.
On a  months bases the measure works fine, but on an agregate level, it doesn't as it just consider to sum the FCST 0

GianlucaM_0-1689677411482.png

How can I re-write the measure to make it works on an agregate (quarterly) level? What I expect is to have a total of QTR 3 of 740+1301+1417


Thanks

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Anonymous ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a new measure. 

fact_ = var _a=SUMX(VALUES('FCST'[Month]),[FCST*])
return
IF(_a = BLANK(),0,_a)

(3) Then the result is as follows.

vtangjiemsft_0-1689822158145.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

Anonymous
Not applicable

Thank you so much @Anonymous , very brilliant work around

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a new measure. 

fact_ = var _a=SUMX(VALUES('FCST'[Month]),[FCST*])
return
IF(_a = BLANK(),0,_a)

(3) Then the result is as follows.

vtangjiemsft_0-1689822158145.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Anonymous
Not applicable

Thank you so much @Anonymous , very brilliant work around

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.