Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
We have table1 in which we are showing "Mahar Ali" attendance.
We have to count that days in which "Mahar" is absent (as shown in table 2) but we have to create a measure or custom column.
In screenshot i am using (show item with no data) but this has to be done without using of (show item with no data).
PunchInDate,Employee columns are from FACT_TABLE
Date,Days columns are from Dim_Date
Please Help!!!
Solved! Go to Solution.
Hi,
In the DimDate table, write this calculated column formula
Weekday = weekday(Calendar[Date],2)
Revised the second measure to:
Absent = countrows(filter(values('DimDate'[Date]),[Emp count]=0&&'DimDate'[Weekday]<=5))
Hi,
Write this measure and drag it to a card visual
Emp count = counta(fact_table[EmpID])
Absent = countrows(filter(values('DimDate'[Date]),[Emp count]=0))
Hope this helps.
thanks for the help ashish , it is working but i want to exclude weekends also.
Hi,
In the DimDate table, write this calculated column formula
Weekday = weekday(Calendar[Date],2)
Revised the second measure to:
Absent = countrows(filter(values('DimDate'[Date]),[Emp count]=0&&'DimDate'[Weekday]<=5))
Thanks for the reply, i have tried this before but it is not working .
Because after && it will accept measure not calculated column.
Hi,
Does this measure work?
Absent = countrows(filter(values('DimDate'[Date]),[Emp count]=0&&weekday(Calendar[Date],2)<=5))
it is working now thank you !!!!!!!!
You are welcome.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |