Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have the below dax for attendance figure.
Hi @batespm ,
try like:
measure =
CALCULATE(
[CBL Attendance %],
date[date] >= TODAY()-21
)
or
measure =
VAR _currendate = MAX(date[date])
RETURN
CALCULATE(
[CBL Attendance %],
date[date] >= _currendate -21
)
If you have a week number column in the table, you may try below
attendance% =
var positivemarks= sumx(topn(3, table, week number),positive marks)
var totalmarks= sumx(topn(3, table, week number),total marks)
return
positivemarks/totalmarks
you may use same concept if you have date cloumn to get last 21 days value.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |