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.
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! 🙂
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 |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |