Forum Discussion
Count per day
- 8 years ago
Hi RTW93,
as a best practice you should use a measure and then apply it based on context because columns only add to your model, and if one expression can change into a measure do it instead of a column, but the syntax for the new colum in calendar table sould be one of this two:
Count per day = CALCULATE(COUNT(Login[ID]), RELATEDTABLE(Login)) Count per day = COUNTROWS(RELATEDTABLE(Login))
Regards,
MFelix
Hi RTW93,
You don't need to create a new column if you add the date column (from calendar table) and the ID and select summarize count it will give you the expected result be aware that you need to have both tables related.
Regards,
MFelix
Hey MFelix,
thanks for your answer, but i need the Colum saved in the table (using table/new Colum). Based on it i need to calculate some other things...
- MFelix8 years agoSuper User
Hi RTW93,
as a best practice you should use a measure and then apply it based on context because columns only add to your model, and if one expression can change into a measure do it instead of a column, but the syntax for the new colum in calendar table sould be one of this two:
Count per day = CALCULATE(COUNT(Login[ID]), RELATEDTABLE(Login)) Count per day = COUNTROWS(RELATEDTABLE(Login))
Regards,
MFelix
- RTW938 years agoFrequent Visitor
Thanks again,
if i use your Solutions i get on every day 3603 (the count of all rows).
- MFelix8 years agoSuper User
You need to relate both tables to use this formulas.
- anandsonar14 years agoFrequent Visitor
Hi MFelix, I have bit similar problem but in my case I have one more column of True/False and I want to take only true rows..How could I do this. Could you please address.
- MFelix4 years agoSuper User