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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Show current MTD totals when Months are column names

I want to show the current MTD in a scorecard.  When I get data for the next, I need the MTD scorecard to change to the next month(Apr would change to May for this example).   

 

I need help, cause I am unsure how the set current MTD when the month names are column names as totals.

 

CompanyJanFebMarAprMayJunJulAugSepOctNovDecTOTAL YTD
Business 1$429,614$476,583$704,145$809,477        $2,419,819
Business 2$6,137,508$6,307,403$8,153,579$9,227,444        $29,825,935
Business 3$1,104,687$1,263,653$1,582,506$1,677,829        $5,628,675
Business 4$940,182$890,088$1,369,215$1,792,425        $4,991,910
Business 5$4,483,125$5,160,110$6,471,902$7,892,766        $24,007,903
Business 6$6,072,445$7,209,537$9,417,692$10,606,649        $33,306,324
Business 7$1,352,037$1,177,437$1,808,468$1,555,193        $5,893,135
Business 8$7,155,104$7,988,619$10,222,523$12,203,791        $37,570,036
Business 9$642,613$725,616$823,462$908,350        $3,100,041
Business 10$2,010,013$1,667,475$1,974,454$2,603,173        $8,255,114
Business 11$211,980$322,336$529,127$517,740        $1,581,183
Business 12$10,750$10,946$21,290$23,442        $66,427
Business 13$182,628$168,755$107,720$115,922        $575,025
TOTALS$30,732,685$33,368,557$43,186,085$49,934,200        $157,221,527
1 ACCEPTED SOLUTION
SamWiseOwl
Super User
Super User

Hi @Anonymous 

If you can't unpivot then consider a measure like:

Return Non Blank = COALESCE( Sum('Coalesce Table'[April]), sum('Coalesce Table'[March]),sum('Coalesce Table'[Feb]), sum('Coalesce Table'[Jan]))
This returns the first non blank value.

If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

5 REPLIES 5
SamWiseOwl
Super User
Super User

Hi @Anonymous 

In the Query Editor (Home -> Transofmr data), remove Totals from the Company:

SamWiseOwl_0-1722867655221.png

Remove the last column

SamWiseOwl_1-1722867690599.png

 

 

 

Highlight all the column you want to unpivot and choose Unpivot only selected columns

SamWiseOwl_0-1722867082927.png

That would look like this

SamWiseOwl_1-1722867111927.png

 

Remove the $ from the data

SamWiseOwl_2-1722867755416.png

Change the data type from text to decimal number 

SamWiseOwl_3-1722867797879.png

 

Create a new table with the months and Sort order by clicking Enter Data on the Home tab:

MonthsSort order

Jan1
Feb2
Mar3
Apr4
May5
Jun6
Jul7
Aug8
Sep9
Oct10
Nov11
Dec12

SamWiseOwl_4-1722867856921.png

 

Click close and apply in the top right to save the changes.
Click on the month column and tell it to sort by the sort order:

SamWiseOwl_5-1722867949761.png

Join this table onto your Month value table using the months:

SamWiseOwl_6-1722867982423.png

Use the Months from the Month sort table as your Columns:

SamWiseOwl_7-1722868033030.png

Choose show items with no data on Months:

SamWiseOwl_8-1722868079885.png

Create a card visual with Value in it:

SamWiseOwl_9-1722868113825.png

 

Apply a filter using the Filter pane to return the MAX month:

SamWiseOwl_10-1722868429306.png

 

 

Then enjoy the end result!

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

SamWiseOwl
Super User
Super User

Hi @Anonymous 

If you can't unpivot then consider a measure like:

Return Non Blank = COALESCE( Sum('Coalesce Table'[April]), sum('Coalesce Table'[March]),sum('Coalesce Table'[Feb]), sum('Coalesce Table'[Jan]))
This returns the first non blank value.

If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Ahh sometimes the simplar solution is the best one!

I appreciate the solution and Kudos thank you 🙂


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

SamWiseOwl
Super User
Super User

Hi @Anonymous 

Would it be possible to unpivot the data in the Query Editor.

This would make all the Month Names in one column and all the values in another.


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Anonymous
Not applicable

Can you please show me an example with the data provided?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.