Forum Discussion
arif_tsrm
2 years agoHelper I
DAX calculation
From a single Fact table I have created two measures from two different column , one is "Total Staff Attendance"=Distinctcount(Table1[Name&Date]), another measure is "NewDC"=Average(Table1[TotalDesk...
arif_tsrm
2 years agoHelper I
Thank you for your reply, I have used your measure and get the difference just I need to know how many days in a month the difference is positive( it is in monthly, the result will 2 days in February)
(a) Calculate Total Staff Attendance as distinct count for a day ; for a month
(b) Calculate NewDC as average for a day ; for a month
(c) Diff of (a) - (b) at month level
[a] - [b]
sevenhills
2 years agoSuper User
Can you share your full DAX syntax? (instead of picture)
Try this and see if it helps
Positive Diff Calc Count =
SUMX( VALUES ( 'DimDate'[MonthName] ), If( [Diff Calc] >= 0, 1, 0))
- arif_tsrm2 years agoHelper I
please see the measure
Diff = VAR ST=SUMX(VALUES(DimCalender[Month Name]),DISTINCTCOUNT(FactAccessControl[Name&Date]))var scr=AVERAGEX(VALUES(DimCalender[Month Name]),AVERAGE(FactAccessControl[TotalDeskGrp.TotalDesk]))var tst=ST-scrreturn tst