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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
thampton
Helper III
Helper III

Time Measures as column headers in Matrix/Table

I have a table that has a few columns : Date, Sales $, Profit $, a few other non-numeric columns. I was wondering if i could create a a table that had time parameters as the column headers (Current Day, Yesterday, MTD, QTD, etc.)? I have already created separate measures but want to consolidate. It was look similar to what is below. 

 

                      Current Day         Yesterday          MTD 

Orders                   5                         2                     10

Sales $                 $30                     $12                  $60

Profit                   $10                      $4                   $20

 

Thank you in advance

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @thampton 

Is this problem sloved?

If not, please let me know.

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-juanli-msft
Community Support
Community Support

Hi @thampton 

If you could accept to transform the table structure or create a new table with a different structure from the original one, you could follow my steps below.

1. in Edit Queries,create a new blank query to copy your table

"New source"->Blank query, open "Advanced editor", enter 

let
Source = Sheet6
in
Source

 

2.in "Query1" created above, split columns "sales", "profit" step by step

8.png

 

3.Then remove "sales.1" and "profit.1" columns

rename  "sales.2" and "profit.2" columns as "sales", "profit"

 

select "sales", "orders" and "profit", unpivot these columns,

 

4. in the new created column "Value", check if its type is of number, if not, transform to number type.

or check each column to change to the proper type.

apply&close

 

5.create measures 

current day = CALCULATE(SUM(Query1[Value]),FILTER(ALLEXCEPT(Query1,Query1[Attribute]),Query1[date]=TODAY()))

yesterday = CALCULATE(SUM(Query1[Value]),FILTER(ALLEXCEPT(Query1,Query1[Attribute]),Query1[date]=TODAY()-1))

MTD = TOTALMTD(SUM(Query1[Value]),Query1[date])

7.png

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.