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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
niteshtrehan89
Helper III
Helper III

Adding a YTD column after the dynamic month column in matrix visual

Hi All, 

 

Need a quick help to in matrix visual.

 

Data is below 

Category        MIS Date       Sales

A                    1-1-2024        100

A                    2-1-2024         200

A                    3-1-2024         300

 

when i am taking the matrix visual, then 

               Jan                Feb             Mar 

A             100               200             300            

 

 

need to add a dynamic column of forecast inside the visual. Any work around for the same.

 

final Output will be 

               Jan                Feb             Mar        Forecast      YTD

A             100               200             300            800          600

 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @niteshtrehan89 

 

You can try to control the output of column total by calculating it as a dynamic column, but with only one column.

An example. Swipe the year-to-date total.

Measure = 
Var _Sum=CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),[MIS Date]>=DATE(YEAR(TODAY()),1,1)&&[MIS Date]<=TODAY()))
RETURN
IF(HASONEVALUE('Table'[MIS Date].[Month]),SUM('Table'[Sales]),_Sum)

Rename:

vzhangtinmsft_0-1727336143291.png

Result:

vzhangtinmsft_1-1727336175849.png

I hope this provides you with ideas.

 

Best Regards,

Community Support Team _Charlotte

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

5 REPLIES 5
niteshtrehan89
Helper III
Helper III

Hi @rajendraongole1 , 

 

thanks for your reply but this not the solution I am looking. 

 

I need first all the months (Jan to Dec) then cummulative YTD the cummulative forecast in a matrix visual. 

 

final Output will be 

 

Category    Jan   Feb   Mar   Apr   May   Jun   Jul   Aug  Sep   Oct  Nov  Dec  YTD     Forecast

     A            10     20     30     40     50      60    70    80    90     100  110  120   780         900

 

Anonymous
Not applicable

Hi, @niteshtrehan89 

 

How is Forecast calculated?

 

Best Regards,

Community Support Team _Charlotte

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

 

 

Hi @Anonymous ,

thanks for the message.

Forecast calculation is not in important. I am loooking how it will be put inside the matrix visual as the dynamic column.  

Anonymous
Not applicable

Hi, @niteshtrehan89 

 

You can try to control the output of column total by calculating it as a dynamic column, but with only one column.

An example. Swipe the year-to-date total.

Measure = 
Var _Sum=CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),[MIS Date]>=DATE(YEAR(TODAY()),1,1)&&[MIS Date]<=TODAY()))
RETURN
IF(HASONEVALUE('Table'[MIS Date].[Month]),SUM('Table'[Sales]),_Sum)

Rename:

vzhangtinmsft_0-1727336143291.png

Result:

vzhangtinmsft_1-1727336175849.png

I hope this provides you with ideas.

 

Best Regards,

Community Support Team _Charlotte

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

rajendraongole1
Super User
Super User

Hi @niteshtrehan89 - create a measure for Year-to-Date (YTD) sales.

YTD Sales =
TOTALYTD(
    SUM('maxt'[Sales]),
    'maxt'[misdate],
    ALL('maxt')
)
another measure for forcast
Forecast Sales =
VAR LatestMonth = MONTH(MAX('maxt'[misdate]))
VAR ActualSales = SUM('maxt'[Sales])
VAR ForecastMultiplier = 12 / LatestMonth
RETURN
ActualSales * ForecastMultiplier
 

rajendraongole1_0-1727279368727.png

 

output is above for ytd and forcast . please check 

 

Hope this works

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors