Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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
User | Count |
---|---|
84 | |
76 | |
69 | |
48 | |
39 |
User | Count |
---|---|
111 | |
56 | |
51 | |
42 | |
41 |