Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
My transactional data looks like this. It's thousands of rows for each day with multiple variables.
ID | Variable | Variable2 | Date |
xx | xx | xx | Jan 1 |
xx | x | xx | Jan 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.
Jan1 | Jan2 | Jan3 | ||
variable1 | sum/count/measure | |||
variable2 | Sum/count/measure |
Any idea/help would be appreciated
Solved! Go to Solution.
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
Hi @NOVICE02 ,
You could unpivot variable columns ( or select other columns and then choose unpivot other columns ).
Then use matrix to show your data.
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
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
I used your first recommendation. It was the easiest and fastest. Thanks so much and i will test the second as well soo
User | Count |
---|---|
125 | |
108 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |