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
abc_777
Solution Specialist
Solution Specialist

hi

hello,

 

here i attached the pbi file. i want to find out number of barcodes there were purchased over 90 days ago.

 

expected result is 90

 

https://drive.google.com/drive/folders/1Q7Hwsu11e4He64fjV_ShAZhWIkFzDRuW?usp=sharing

 

 

thanks

2 REPLIES 2
jolind1996
Resolver II
Resolver II

To find the number of barcodes purchased over 90 days ago, you can create a measure in Power BI using DAX. Here’s an example:

BarcodeCount = 
CALCULATE(
    COUNT('Table'[BARCODE]), 
    FILTER(
        ALL('Table'[Latest INVOICE_DT]), 
        'Table'[Days Since last Purchase] > 90
    )
)

This measure counts the number of barcodes where the days since the last purchase is more than 90. Please replace 'Table' with your actual table name. This should give you the expected result of 22. I hope this helps! If you have any other questions, feel free to ask.

 

Best regards,

Johannes

thx for your time @jolind1996 

 

but it gives me items that were purchased. but I want those items not purchased within 90 days

 

I want the item to count over 90 days. 

 

I attached another Sample pbix and xlsx file where you can see 46 items that were over -90 days, so no invoice was generated 90 days

 

I have Invoice_Dt in the sales table where the barcode store as well as a Global calendar table named bmcalendar 

I want to click the month of the year and check which count of barcodes from that month backward over -90 days not sold

 

IN KPI card visual i want

https://drive.google.com/drive/folders/1r0UcGHmJ_0PtWw7G6s0rq-MQiVSypVei?usp=sharing

 

thx

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.