Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I have a salary data and I created date table with week no. Below is my data
I want to visualize week vs total salary and getting below visual
I want to visualze start of the week date vs total salary. Above visual is not reall good for our user. I need to have table like below
| Date | WeekNo | Total Salary |
| Monday, July 12, 2021 | 30 | 19616.62 |
| Monday, July 19, 2021 | 31 | 20112.84 |
| Monday, July 26, 2021 | 32 | 20112.84 |
| Monday, August 02,2021 | 33 | 20112.84 |
| Monday, August 09,2021 | 34 | 20112.84 |
If I get the above table , then I can visualize. Not sure how to get the start date of the week?
Can anyone advise
Attach my pbix file https://we.tl/t-vKmhVtBYmH
Solved! Go to Solution.
@bourne2000 please try this
Measure =
VAR _0 =
MAX ( 'Date'[WeekNo] )
VAR _1 =
CALCULATE (
SUM ( Data[Total Salary] ),
ALL ( 'Date' ),
TREATAS ( { _0 }, 'Date'[WeekNo] )
)
RETURN
SWITCH ( TRUE (), MAX ( 'Date'[Day Name] ) = "Mon", _1 )
@bourne2000 please try this
Measure =
VAR _0 =
MAX ( 'Date'[WeekNo] )
VAR _1 =
CALCULATE (
SUM ( Data[Total Salary] ),
ALL ( 'Date' ),
TREATAS ( { _0 }, 'Date'[WeekNo] )
)
RETURN
SWITCH ( TRUE (), MAX ( 'Date'[Day Name] ) = "Mon", _1 )
| User | Count |
|---|---|
| 56 | |
| 42 | |
| 30 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 70 | |
| 58 | |
| 38 | |
| 22 | |
| 22 |