March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello, I have a data table as below:
Day | Item | Inventory | Empty | Full |
1/1/2023 | a | full | 0 | 1 |
1/1/2023 | b | empty | 1 | 0 |
1/1/2023 | c | full | 0 | 1 |
1/1/2023 | d | full | 0 | 1 |
1/2/2023 | a | full | 0 | 1 |
1/2/2023 | b | empty | 1 | 0 |
1/2/2023 | c | full | 0 | 1 |
1/2/2023 | d | full | 0 | 1 |
1/2/2023 | e | full | 0 | 1 |
1/3/2023 | a | empty | 1 | 0 |
1/3/2023 | b | full | 0 | 1 |
1/3/2023 | c | full | 0 | 1 |
1/3/2023 | d | full | 0 | 1 |
1/3/2023 | e | full | 0 | 1 |
and so on but with many more items and days over 5 years.
I created a stacked bar chart with:
x-axis = Day with hiearchy
y-axis = Sum of Empty and Sum of Full
It looks correct from the date level. When I Drill Up to Month it shows total sum. But I would like to see average.
For example Jan 2023 is currently showing Empty=3 and Full=11 but I would like for it to show Empty=1 and Full=3.666
I tired to simply select average in the visualization drop down but it shows me numbers less than 1 which is incorrect.
Thank you!
Solved! Go to Solution.
create a new column
Proud to be a Super User!
how you get 3.666? what's the calculation logic?
Proud to be a Super User!
It is from 11 (sum of all the 1s in Filled Column in Jan shown) divided by 3 (total days in Jan shown): 11/3=3.666666667
create a new column
Proud to be a Super User!
Thank you @ryan_mayu ! May I ask how to expand this solution so it encompasses all 5 years of data please? There would be 5 Januarys
then you changed the column to
yearmonth = year('Table'[Day]) & FORMAT('Table'[Day],"mmm")
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
86 | |
70 | |
51 |
User | Count |
---|---|
206 | |
150 | |
97 | |
78 | |
69 |