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
Anonymous
Not applicable

Calculate for current month

Hello All, 

I have a static table with percents for each month i need to calculate the miles for current month percentage 

static table 

 

TypeJulAugSepOctNovDecJanFebMarAprMayJun
TP9.6%18.9%27.3%35.9%42.5%49.0%57.5%65.4%74.6%83.0%91.5%100.0%
TDPS8.1%16.5%23.5%30.2%35.5%42.6%56.5%66.5%76.3%84.9%92.9%100.0%
TDT8.3%16.5%23.9%30.9%36.3%43.4%57.0%67.0%76.6%85.1%92.8%100.0%
TD19.1%18.2%26.9%35.7%43.4%51.6%60.5%68.1%76.6%84.2%92.2%100.0%
G8.7%16.8%24.5%33.3%39.3%47.1%57.7%64.9%74.3%83.9%92.4%100.0%
WL6.4%13.5%19.1%25.1%29.6%37.7%55.9%69.7%81.0%88.7%94.4%100.0%

 

and the table with values that need to calculated 

 

TypeMileage  Time%  Time Days
TP11,000000
TDPS7,50056040%118
TDT9,50067040%133
TD113,000

0

00
TUB10,000000
TCC1,800000
TAB12,000000
G300000

 

now for Type TDPS we have to calculate mileage for this current month % for static table 

for TDPS mileage is 7,500 and current month is may 

so i have to show the value 6963.95 which is (92.9%*7,500)

 

 

1 REPLY 1
lbendlin
Super User
Super User

Unpivot the first table, convert the months to proper date fields (including day and year), then join the tables via the Type column (for example) to compute your measure.

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.