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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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