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

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 Blog -Week is not so Weak Proud to be a Super User! Connect on 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 Blog -Week is not so Weak Proud to be a Super User! Connect on Linkedin


View solution in original post

Highlighted
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 II
Helper II

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 II
Helper II

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
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors