Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Good morning , everyone,
Thank you in advance for your attention. I have a question about how to count in a column. I give this example
If I want to count the number of customers who have bought on the 24th it is simple. I would have 6 customers with purchases that day. My problem comes as modeling in power bi if I wanted to calculate the number of customers who have purchased on the 24th but have not bought any previous day. That is, only 3 clients (customer 9, 8 and 5)
I hope I haven't messed up too much.
Thank you all again.
Solved! Go to Solution.
Please try this,
create a date table, and put the column in slicer,
then create a measure
Measure =
var _date=SELECTEDVALUE('Date'[Date])
var _previous= CALCULATE(MIN('Table'[Date]),FILTER('Table','Table'[Value]>0))
return IF(_previous<_date,0,1)
and put the measure into visual-level filter, and set it to 1
then when you select 24th,
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Please try this,
create a date table, and put the column in slicer,
then create a measure
Measure =
var _date=SELECTEDVALUE('Date'[Date])
var _previous= CALCULATE(MIN('Table'[Date]),FILTER('Table','Table'[Value]>0))
return IF(_previous<_date,0,1)
and put the measure into visual-level filter, and set it to 1
then when you select 24th,
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Create a calculated column and put it in a card...
count C =
IF(
Table1[11-24-2022] <> BLANK() && Table1[11-23-2022] = BLANK() && Table1[11-22-2022] = BLANK(),
1
)
or you can create a measure and put it in a card...
count M =
CALCULATE(
COUNT(Table1[Client]),
Table1[11-24-2022] <> BLANK(),
Table1[11-23-2022] = BLANK(),
Table1[11-22-2022] = BLANK()
)
Thanks for the answer, but if I have to take a whole year, how do I do? Creating the measure would be eternal
The idea is that if I mark in the power bi calendar a few days, I count only customers other than that date, but who have not purchased in the rest of the year, since January 1.
Maybe I didn't explain it well in the first message, sorry
User | Count |
---|---|
66 | |
61 | |
47 | |
33 | |
32 |
User | Count |
---|---|
87 | |
72 | |
56 | |
49 | |
45 |