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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Calculate volume for forecast and actual

I have financial year from nov - oct,suppose i am in june month and selected jun from month my actuals should be coming from table fcjun2021,forecast coming from table fcmay2021 in both the tables month is same i.e june.

Sreenivasula_0-1630646504610.png

How can i achieve it.

 

 

11 REPLIES 11
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

First, you can get the selected month from the filter, then use calculate (sum (xx), filter (xxx)) to obtain data from table fcjun2021 for calculation, and then use the time intelligence function to calculate forecast coming from table fcmay2021. If you don't understand how to do it, you can share the sample data for further help.

 

 

Best Regards,

Community Support Team _Tang

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

Anonymous
Not applicable

fcjun2021nov decjanfebmaraprmayjunjulaug septoct
a100200300400500600700800900100015002000
b5060708090100110120130140150160
c102030405060708090100110120
volume       333    

 

 

fcmay2021nov decjanfebmaraprmayjunjulaug septoct
a100200300400500600700600900100015002000
b5060708090100110160130140150160
c102030405060708090100110120
volume       768   

 

 

here the month jun actual is 333 (avg of dept a,b,c) and forcast should be 768 that is coming from previous month so when i select month jun and dept a it should be 800 other than a,b,c i need to display  333 as actual ,fc will be change according dept, how can i achieve it?

Hi @Anonymous 

I've solved the first question now, but I dont know what the sentence bellow means. how we get 768?

 forcast should be 768 that is coming from previous month 

figure bellow is my current calculation result, 

vxiaotang_6-1631006420991.png

vxiaotang_7-1631006433024.png

vxiaotang_8-1631006631952.png

 

 

 

Best Regards,

Community Support Team _Tang

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

Anonymous
Not applicable

how you achieve it ?

Hi @Anonymous 

sample file I attached below.

-

besides, you need to unpivot your table in desktop firstly,

vxiaotang_0-1631065532031.png

resultvxiaotang_1-1631065532047.png

2. the type of [nov, dec, jan...] is text and we cannot sort it in visual, so we need to add this table bellow, then merge it with the other 2 tables, 

vxiaotang_2-1631065579813.png

vxiaotang_3-1631065579819.png

vxiaotang_4-1631065579823.png

then use Sort by column,

vxiaotang_5-1631066410256.png

3. create the measure,

 

MeasureActual = 
    IF(ISINSCOPE(fcjun2021[dept]),
        SUM(fcjun2021[Value]),
        IF(MIN(fcjun2021[month])=SELECTEDVALUE(monthFilter[month]),
            IF(ISBLANK([M_selected_dept]),
                DIVIDE(
                    CALCULATE(SUM(fcjun2021[Value]),ALLEXCEPT(fcjun2021,fcjun2021[month])),
                    COUNT(deptFilter[dept])),
                CALCULATE(MIN(fcjun2021[Value]),FILTER(ALL(fcjun2021),fcjun2021[month]=[M_selected_month]&&fcjun2021[dept]=[M_selected_dept]))
    )))

 

hope it helps!

 

 

Best Regards,

Community Support Team _Tang

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

Anonymous
Not applicable

But for me both fcjun2021 and fcmay2021 are in same sheet not diff tables

Anonymous
Not applicable

share the measure what you written.

Anonymous
Not applicable

768 is forecast for present month and taking from previous month

Hi @Anonymous 

thanks for your reply, I know 768 is forecast value, but what's the calculation logic of it? 

 

Best Regards,

Community Support Team _Tang

Anonymous
Not applicable

oh that is also avg by mistake i mentioned as sum that should be 256. also you can share dax for the above.

 

amitchandak
Super User
Super User

@Anonymous , Both Tables should be unpivoted and months should be in rows. (you can create a date from that.

 

Using common date/month table you can analyze them together

 

https://radacad.com/pivot-and-unpivot-with-power-bi

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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