Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I've have a custom table and need to calculate some count totals on it.
I'm trying to count the total amount of "yes" per date, per ID number (see example). The ID number is not unique and trying to find how many times a certain ID number has "yes" on every day. Is there a way to have a calculated column (or maybe custom table) that totals the amount of a certain word and can filter on other data?
Count total (calculated column) Adjustment Date ID number
2 No 29-3-2021 00:00 1
5 Yes 29-3-2021 00:00 2
3 No 29-3-2021 00:00 2
4 Yes 29-3-2021 00:00 4
3 No 30-3-2021 00:00 2
Solved! Go to Solution.
Hi @Anonymous
Here is another solution for the problem that you are facing.
Create a calculated column by using the below dax code and use that column as a sum.
Count =
Var _Id='Table'[ID number]
Var _Date='Table'[Date]
Var _FiltTable = Filter('Table','Table'[ID number] = _Id&& _Date ='Table'[Date]&& 'Table'[Adjustment]= "Yes")
Return Calculate(COUNT('Table'[ID number]),_FiltTable)
If this post helps, then please consider accepting it as the solution to help the other members find it more quickly.
Regards,
Atma.
Hi @Anonymous
Here is another solution for the problem that you are facing.
Create a calculated column by using the below dax code and use that column as a sum.
Count =
Var _Id='Table'[ID number]
Var _Date='Table'[Date]
Var _FiltTable = Filter('Table','Table'[ID number] = _Id&& _Date ='Table'[Date]&& 'Table'[Adjustment]= "Yes")
Return Calculate(COUNT('Table'[ID number]),_FiltTable)
If this post helps, then please consider accepting it as the solution to help the other members find it more quickly.
Regards,
Atma.
This worked, thank you very much
Hi
Create a measure and use it in the report.
You can create a table visual in the report with the fields: Date, ID number and Measure; and i guess you get the expected results
Measure =
COUNTROWS(
GROUPBY(YOUR_TABLE,YOUR_TABLE[Date],YOUR_TABLE[ID number])
)
Kind regards,
José
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |