Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello, I am new to this community and pretty new to PowerBI. This is my first question but it won't be my last :).
My rows are customers, columns are products and values are sales.
I would like to add a column that shows when sales are before a certain date (1-7-2023), that it is an "existing customer". And if it has sales after that date or no sales at all that it would be a "White spot".
Thank you in advance
Solved! Go to Solution.
Hi @VoZ ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a calculated column.
Column = IF('Table'[sale date]<=DATE(2023,7,1),"existing customer","White spot")
//You can replace 2013/7/1 with the date you need
(3) Then the result is as follows.
If you need to control date changes with a slicer, then you can create measure.
table:
Date = CALENDAR(DATE(2023,1,1),DATE(2023,12,31))
measure:
Measure =
var _slicer=SELECTEDVALUE('Date'[Date])
return IF(MAX('Table'[sale date])<=_slicer,"existing customer","White spot")
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @VoZ ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a calculated column.
Column = IF('Table'[sale date]<=DATE(2023,7,1),"existing customer","White spot")
//You can replace 2013/7/1 with the date you need
(3) Then the result is as follows.
If you need to control date changes with a slicer, then you can create measure.
table:
Date = CALENDAR(DATE(2023,1,1),DATE(2023,12,31))
measure:
Measure =
var _slicer=SELECTEDVALUE('Date'[Date])
return IF(MAX('Table'[sale date])<=_slicer,"existing customer","White spot")
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
57 | |
22 | |
18 | |
16 | |
11 |
User | Count |
---|---|
85 | |
54 | |
39 | |
21 | |
18 |