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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.