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.
Hi all,
I am trying to create a DAX measure I can use in a card visual that will display the total sum (value column) for type column = customers for the last 2 days including today.
there is what the data looks like:
date | ID | Type | Value |
1/28/2021 | 1 | customer | 10 |
1/28/2021 | 1 | internal | 15 |
1/28/2021 | 1 | users | 55 |
1/28/2021 | 1 | temp users | 669 |
1/28/2021 | 2 | customer | 69 |
1/28/2021 | 2 | internal | 48 |
1/28/2021 | 2 | users | 86 |
1/28/2021 | 2 | temp users | 97 |
1/28/2021 | 3 | customer | 52 |
1/28/2021 | 3 | internal | 34 |
1/28/2021 | 3 | users | 65 |
1/28/2021 | 3 | temp users | 888 |
1/29/2021 | 1 | customer | 463 |
1/29/2021 | 1 | internal | 987 |
1/29/2021 | 1 | users | 525 |
1/29/2021 | 1 | temp users | 22 |
1/29/2021 | 2 | customer | 563 |
1/29/2021 | 2 | internal | 1858 |
1/29/2021 | 2 | users | 11 |
1/29/2021 | 2 | temp users | 256 |
1/29/2021 | 3 | customer | 658 |
1/29/2021 | 3 | internal | 478 |
1/29/2021 | 3 | users | 33 |
1/29/2021 | 3 | temp users | 25 |
1/28/2021 | 1 | customer | 154 |
1/28/2021 | 1 | internal | 5454 |
1/28/2021 | 1 | users | 658 |
1/28/2021 | 1 | temp users | 578 |
1/28/2021 | 2 | customer | 596 |
1/28/2021 | 2 | internal | 41654 |
1/28/2021 | 2 | users | 415 |
1/28/2021 | 2 | temp users | 552 |
1/28/2021 | 3 | customer | 6547 |
1/28/2021 | 3 | internal | 552 |
1/28/2021 | 3 | users | 224 |
1/28/2021 | 3 | temp users | 4 |
thank you for the help
Solved! Go to Solution.
@FatBlackCat30 , Based on what I got. Create a measure like
calculate(count(Table[ID]), filter(Table, Table[date] >=Today() -1 && Table[date] <=Today() && Table[Type] = "customer"))
or
calculate(distinctcount(Table[ID]), filter(Table, Table[date] >=Today() -1 && Table[date] <=Today() && Table[Type] = "customer"))
sum of value
calculate(count(Table[value]), filter(Table, Table[date] >=Today() -1 && Table[date] <=Today() && Table[Type] = "customer"))
@FatBlackCat30 , Based on what I got. Create a measure like
calculate(count(Table[ID]), filter(Table, Table[date] >=Today() -1 && Table[date] <=Today() && Table[Type] = "customer"))
or
calculate(distinctcount(Table[ID]), filter(Table, Table[date] >=Today() -1 && Table[date] <=Today() && Table[Type] = "customer"))
sum of value
calculate(count(Table[value]), filter(Table, Table[date] >=Today() -1 && Table[date] <=Today() && Table[Type] = "customer"))
worked perfectly thanks for the help
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 |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |