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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
harshadrokade
Post Partisan
Post Partisan

Table visual with data from Data tab + measures

Hi,

 

I have below data. 

 

Project name1-May-251-Jun-251-Jul-251-Aug-251-Sep-251-Oct-251-Nov-251-Dec-251-Jan-26
A233914201417333536
B143728351435171226
C373140291412302425
D172437132927313315
E321840162415153633

 

I want to create a Table visual as below. he YTD and Estimated will be calculated values through measure. I am unable to understand how to add the calculated measures to the table visual. Can u pls help as I am new to this type of use case-

 

          YTDEstimated
Project name1-May-251-Jun-251-Jul-251-Aug-251-Sep-251-Oct-251-Nov-251-Dec-251-Jan-26 1-Mar-263-Apr-264-May-26
A23391420141733353636354022
B14372835143517122626143925
C37314029141230242525272119
D17243713292731331515272912
E32184016241515363333262326
1 ACCEPTED SOLUTION

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1769914875282.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

12 REPLIES 12
v-echaithra
Community Support
Community Support

Hi @harshadrokade ,

If possible, could you please provide more details about your data?

How to provide sample data in the Power BI Forum

You can refer the following link to upload the file to the community.
How to upload PBI in Community

Thank you.

 

The data shared in oroginal post can be considered as the data

Ashish_Mathur
Super User
Super User

Hi,

If Table 1 shows the shape of the input data table, then you will have to first "Unpivot Other Columns" in Power Query and then build a matrix visual.  But in the matrix visual, if you want to add 4 additional columns (YTD and the last 3 column of your Table 2), then you may have to use calculation groups.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Can u pls help me to understand how the calculation groups can help me to achieve this?

 

Hi,

Could you share sample data and the logic of your forecast calculations. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Data is same as I shared in first port.

Logic for Forecasted value-
Assuming I have a column with the actual values for each month:

 

Month Value

Jan100
Feb120
Mar140
Apr160
May180

 

I will calculate the average monthly growth rate as follows:

  1. Calculate the growth rate for each month:

    • Feb: (120 - 100) / 100 = 20%
    • Mar: (140 - 120) / 120 = 16.67%
    • Apr: (160 - 140) / 140 = 14.29%
    • May: (180 - 160) / 160 = 12.5%
  2. Calculate the average monthly growth rate:

    • (20 + 16.67 + 14.29 + 12.5) / 4 = 15.89%
  3. Calculate the forecast for the 6th month:

    • Forecast = 180 * (1 + 15.89/100) = 208.60

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1769914875282.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I wanted to add YTD also After Jan26. 
Also Is there a way to highlight Feb and March as Foorecastred months in header?

 

Do not know how to add the YTD column.  Not sure of how to colour te header but you can colout the value

Ashish_Mathur_0-1770074875112.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Alex_Sawdo
Resolver II
Resolver II

I think this would be more obtainable using the Matrix visual rather than a Table visual, so you can group the months together better. 

A possible solution could be to create a calculated column, and have it structured something like this:

Period = 
IF(
    'YourDateTable'[YourDateColumn] <= TODAY(),
    FORMAT('YourDateTable'[YourYearColumn],"yyyy"),
    "Future Period"
)

And put this column above your month column in the "Columns" section of your matrix. Then, write a measure that uses your YTD measure and your Estimated measure together with a similiar logic:

YourNewMeasure = 
IF(
    'YourDateTable'[YourDateColumn] <= TODAY(),
    YourYTDMeasure,
    Estimated
)

And put this in the "Values" section. For the "Rows" section, you can use the "Project Name" column. This should give you the expected results, however the "YTD" column would actually be the "Total" column for that subgroup but would accomplish the same goal.



Thanks a lot. Can u pls explan this with an example?

Lets say I have this subset of data (similiar to what you have, treated as estimation data) in conjuction with some real sales data from months that have already passed

CustomerID1/1/20252/1/20253/1/20254/1/20255/1/20256/1/20257/1/20258/1/20259/1/202510/1/202511/1/202512/1/20251/1/20262/1/20263/1/20264/1/20265/1/20266/1/20267/1/2026
C001

7

4

8

4

9

4

8

6

4

3

7

6

12

3

10

14

4

2

1

C002

7

3

3

4

10

1

3

3

13

3

6

1

3

5

11

11

1

0

10

C003

2

4

5

2

1

7

6

4

11

4

5

6

4

11

11

15

13

5

5

C004

7

5

7

7

3

4

0

2

6

5

3

2

4

2

8

3

3

8

9

C005

1

7

0

3

13

5

7

1

11

3

6

2

0

2

7

9

11

4

7

C006

3

2

0

2

8

3

10

3

5

3

3

1

13

2

8

3

8

7

14

C007

1

6

9

7

2

4

15

7

11

3

1

3

6

13

0

0

6

1

0

C008

1

7

2

7

12

4

6

3

4

2

3

7

15

1

6

15

3

3

3

C009

6

4

9

7

1

4

5

7

10

2

4

2

10

11

13

3

6

13

2

C010

1

2

10

1

11

6

12

2

9

2

3

6

15

14

3

3

12

14

8

Within Power Pivot (the "transform" section) I'll unpivot this data to be like this:

CustomerIDDateEstimated Sales
C0011/1/257
C0012/1/254

And here's my data model, after transformation and joins (Ensure the "Date" column in "Estimation Data" is a date and not text):

Alex_Sawdo_0-1769524636665.png

 

Then write a measure calculating the total amount of estimated and actual sales and combine them into another measure (using my logic from the previous post):

Sales + Estimations = 
IF(
    SELECTEDVALUE(
        'Date'[Period]
    ) = "Future Period",
    [Estimated Sales],
    [Total Sales]
)

 Then put it all into a matrix:

Alex_Sawdo_1-1769525194670.png

For the desired output (with a few formatting changes):

Alex_Sawdo_2-1769525222583.png

The real sales data will be used for anything that has already occured, and the estimates will be used for future dates. 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.