Forum Discussion
How to create expression for detect new product ?
- 4 years ago
Hi,
This calculated column formula works
New Product_final 1 = IF(and(INVC[Last Sales]=blank(),invc[Last Purchase Date]<>blank()),"New product","Existing product")Hope this helps.
Thank you for sharing . i have try your propose code , it display Blank . Actual my condition , There is no sales for new product , Last Sales is 00/00/0000 , But There is Purchase date. As i indicate in Red below.
Last Sales = 00/00/0000 & Last Purchase Date not = 00/00/0000 is equal to new product
- VahidDM4 years ago
Super User
admin11
Try this measure:Measure = IF(
ISBLANK( MAX( [Last Sales] ) ) && NOT ISBLANK( MAX( [Last Purchase Date] ) ),
"New Product",
MAX( [Last Sales] )
)If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
- admin114 years ago
Memorable Member
I have try using column , it got error , when i try as measure , it does not able filter.
My PBI file :-
https://www.dropbox.com/s/x3w1smk5p2atfxm/PBT_V2021_118.pbix?dl=0
Paul
- Ashish_Mathur4 years ago
Super User
Hi,
Try this measure
=countrows(filter(values(Data[Model_invc]),[last sales]=blank()&&[last purchase date]<>blank()))
Hope this helps.
- admin114 years ago
Memorable Member
I still get error after modify your script.new_pro = countrows(filter(values(data[INVC][Last Salesl=blank()&&[Purchase date]<>blank())))