Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
My card visual should show total errors from the previous day's accounts but it's returning 'blank':
I've used the following measure for the field value:
Do I need to rename fields or tables in the DAX measure?
Solved! Go to Solution.
You can use the following adjusted DAX expression:
Error Count =
VAR CurrentDate = TODAY()
VAR PrevDay = CurrentDate - 1
VAR DayOfWeek = WEEKDAY(CurrentDate, 2) -- 2 = Monday, 7 = Sunday
VAR SelectedDate =
IF(
DayOfWeek = 1, -- If today is Monday, check for Friday's data
CurrentDate - 3,
PrevDay
)
RETURN
CALCULATE(
COUNTROWS('Table'),
'Table'[Date] = SelectedDate,
'Table'[Status] = "Error"
)
The results are as follows:
Best Regards
hackcrr
If I have answered your question, please mark my reply as solution and kudos to this post, thank you!
Great! It worked! Thank you for your help!
You can use the following adjusted DAX expression:
Error Count =
VAR CurrentDate = TODAY()
VAR PrevDay = CurrentDate - 1
VAR DayOfWeek = WEEKDAY(CurrentDate, 2) -- 2 = Monday, 7 = Sunday
VAR SelectedDate =
IF(
DayOfWeek = 1, -- If today is Monday, check for Friday's data
CurrentDate - 3,
PrevDay
)
RETURN
CALCULATE(
COUNTROWS('Table'),
'Table'[Date] = SelectedDate,
'Table'[Status] = "Error"
)
The results are as follows:
Best Regards
hackcrr
If I have answered your question, please mark my reply as solution and kudos to this post, thank you!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
67 | |
58 | |
50 | |
36 | |
34 |
User | Count |
---|---|
84 | |
73 | |
58 | |
45 | |
44 |