cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NOVICE02 Helper I
Helper I

Need to show metrics by day (in columns) in Matrix

Hi All,

My transactional data looks like this. It's thousands of rows for each day with multiple variables. 

 

IDVariableVariable2Date
xxxxxxJan 1
xxxxxJan 2

right now I can only have it with the date running down vertically and the variable summaries running down vertically as well.

 

 

I need to summarize data like below.

 Jan1Jan2Jan3 
variable1sum/count/measure   
variable2Sum/count/measure   

 

Any idea/help would be appreciated

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: Need to show metrics by day (in columns) in Matrix

Not the exact.

In matrix display you have option show on rows - This will move the measure to rows.

 

Also, you can try to have a table like this and use it for further display.

union(
summarize(table,table[date],"Var","Variable 1", "Sum",sum(table[variable 1]), "Count",count(table[variable 1])),
summarize(table,table[date],"Var","Variable 2", "Sum",sum(table[variable 2]), "Count",count(table[variable 2]))
)

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin


View solution in original post

4 REPLIES 4
Super User IV
Super User IV

Re: Need to show metrics by day (in columns) in Matrix

Not the exact.

In matrix display you have option show on rows - This will move the measure to rows.

 

Also, you can try to have a table like this and use it for further display.

union(
summarize(table,table[date],"Var","Variable 1", "Sum",sum(table[variable 1]), "Count",count(table[variable 1])),
summarize(table,table[date],"Var","Variable 2", "Sum",sum(table[variable 2]), "Count",count(table[variable 2]))
)

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin


View solution in original post

Community Support
Community Support

Re: Need to show metrics by day (in columns) in Matrix

Hi @NOVICE02 ,

 

You could unpivot variable columns ( or select other columns and then choose unpivot other columns ).

Then use matrix to show your data.

2-1.PNG

3-1.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
NOVICE02 Helper I
Helper I

Re: Need to show metrics by day (in columns) in Matrix

I used your first recommendation. It was the easiest and fastest. Thanks so much and i will test the second as well soo

NOVICE02 Helper I
Helper I

Re: Need to show metrics by day (in columns) in Matrix

I tried unpivot but it's not supported in direct query and i have to keep this the same because there are too many columns to do an import without a lag

 

I wrote this to unpivot:

select
  cal_date,
  Calls_Handled
from
 OB_Portfolio4 unpivot (
    Volumes for Metrics IN (Calls_Handled AS 'Calls_Handled ')
  );

but keep getting this error:   Details: "Microsoft SQL: Incorrect syntax near the keyword 'AS'."

 

Any help would be appreciated

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors