The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi All,
This is the first time I have the honor to communicate with you.
I need a way to show 2 indicators :
1- A indicator to show the data from the start date up to the current week
2- A indicator to show the data from the start date up to last week
note, the weekday starts on Sunday and ends on Thursday.
Thanks for All,
Solved! Go to Solution.
Hi @Shak_95 ,
Please check if this could meet your requirements:
1- A indicator to show the data from the start date up to the current week
This Week =
VAR Today_ =
TODAY ()
VAR _endOfWeekDate =
Today_ + 7
- WEEKDAY ( Today_, 1 )
RETURN
CALCULATE (
SUM ( Table1[Value] ),
Table1[Date] <= _endOfWeekDate,
WEEKDAY ( Table1[Date], 1 ) IN { 1, 2, 3, 4, 5 }
)
2- A indicator to show the data from the start date up to last week
Previous Week =
VAR Today_ =
TODAY ()
VAR _endOfLastWeekDate =
Today_ - WEEKDAY ( Today_, 1 )
RETURN
CALCULATE (
SUM ( Table1[Value] ),
Table1[Date] <= _endOfLastWeekDate,
WEEKDAY ( Table1[Date], 1 ) IN { 1, 2, 3, 4, 5 }
)
If this couldn't help you, please check:
How to Get Your Question Answered Quickly - Microsoft Power BI Community
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Shak_95 ,
Please check if this could meet your requirements:
1- A indicator to show the data from the start date up to the current week
This Week =
VAR Today_ =
TODAY ()
VAR _endOfWeekDate =
Today_ + 7
- WEEKDAY ( Today_, 1 )
RETURN
CALCULATE (
SUM ( Table1[Value] ),
Table1[Date] <= _endOfWeekDate,
WEEKDAY ( Table1[Date], 1 ) IN { 1, 2, 3, 4, 5 }
)
2- A indicator to show the data from the start date up to last week
Previous Week =
VAR Today_ =
TODAY ()
VAR _endOfLastWeekDate =
Today_ - WEEKDAY ( Today_, 1 )
RETURN
CALCULATE (
SUM ( Table1[Value] ),
Table1[Date] <= _endOfLastWeekDate,
WEEKDAY ( Table1[Date], 1 ) IN { 1, 2, 3, 4, 5 }
)
If this couldn't help you, please check:
How to Get Your Question Answered Quickly - Microsoft Power BI Community
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |