Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
VoZ
New Member

Existing or White spot customer

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 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @VoZ ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data.

vtangjiemsft_0-1687917397759.png

(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.

vtangjiemsft_1-1687917434625.png

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")

vtangjiemsft_2-1687917778200.png

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. 

View solution in original post

1 REPLY 1
v-tangjie-msft
Community Support
Community Support

Hi @VoZ ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data.

vtangjiemsft_0-1687917397759.png

(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.

vtangjiemsft_1-1687917434625.png

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")

vtangjiemsft_2-1687917778200.png

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. 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors