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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Shloka_Lakhani
Frequent Visitor

How to create dynamic Pivot table

Hello All,

I want table like this

                  jan |       feb |     march |         total |     YTD
GBV $123,456 | $56783 | $842567 | $1022806 | $206754
Bookings   23  |        65 |            56 |           144 | 50

how to make it in powerbi using pivot or measure?

I have tried measure like:
company_kpi_booking = IF(HASONEVALUE(booking_table[Matrix]),
SWITCH(SELECTEDVALUE(booking_table[Matrix]),
"2024 Actual",[C_current_year_booking_count],
"2024 Goal",[C_booking_target],
"2023 Actual",[C_prior_year_booking_count],
"% of Goal",FORMAT([C_booking_goal%], "#0.00%")
)
)

but it shows only first measure's value as respective all rows. 
Mean it is only shows total column and bifurcate  by month as i have put month in column field on matrix.


Shloka_Lakhani_0-1708000048665.png

 

I want to add one more column at last of total.

1 REPLY 1
nareshr89
Helper II
Helper II

If Month is coming from Data table it might not be possible, but if you have a Dim_table with Month Names alone then you can try by using IF condition and adding a new row along with Month names something like YTD or TOTAL. Also, what is the difference between YTD & TOTAL in your view. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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