Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
This is a very simplified version of my table. The actual one has like 20+ columns. I want to add up the orders for the whole week, divide by the number of days and visualize it on the bar chart. So, for each date, the value will look like this. For 11 to 15 sept week, the total 510 divided by 5days is 84. All the days are weekdays, monday to friday.
The graph will look like this. The orders by date.
How shall I achieve this?
thanks all.
Solved! Go to Solution.
Hi @katto16 ,
You can create a measure as below to get it, please find the details in the attachment.
Measure =
VAR _seldate =
SELECTEDVALUE ( 'Table'[Date] )
VAR _sumoforders =
CALCULATE (
SUM ( 'Table'[Orders] ),
FILTER (
ALLSELECTED ( 'Table' ),
WEEKNUM ( 'Table'[Date], 2 ) = WEEKNUM ( _seldate, 2 )
)
)
RETURN
DIVIDE ( _sumoforders, 5 )
And for the number of days, from Sep 18 to Spe 23, it will be 6 days. So it will divided by 6?
Best Regards
Hi @katto16 ,
You can create a measure as below to get it, please find the details in the attachment.
Measure =
VAR _seldate =
SELECTEDVALUE ( 'Table'[Date] )
VAR _sumoforders =
CALCULATE (
SUM ( 'Table'[Orders] ),
FILTER (
ALLSELECTED ( 'Table' ),
WEEKNUM ( 'Table'[Date], 2 ) = WEEKNUM ( _seldate, 2 )
)
)
RETURN
DIVIDE ( _sumoforders, 5 )
And for the number of days, from Sep 18 to Spe 23, it will be 6 days. So it will divided by 6?
Best Regards
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
116 | |
101 | |
88 | |
35 | |
35 |
User | Count |
---|---|
152 | |
100 | |
83 | |
63 | |
54 |