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
Ice1341
Helper I
Helper I

Need Dax formula for calculating pallets for each product line

I have a report built with cases for each item/product line, but in order to get pallet quantity, I need to divide by 40 for JUICE category and 80 for frozen ice. Here's the sample, pallet quantity is incorrect.

YearMonthbillToCustomerNumberdescriptionGrSalesOrderAmtNet amountPalletsquantityProd Line
2022JanuaryREPIRSTR0298 Strawberry FJ 90pk MC-90 cups/ 4oz ea432041042160JUICE
2022JanuarySTARCHI0458 Cherrymoji FJ 90pk MC-90 cups/ 4oz ea308443084411880JUICE
2022JanuarySTARMAN0090 Mango FJ 90pk MC-90 cups/ 4oz ea108010800.540JUICE
2022JanuarySTARSTR0298 Strawberry FJ 90pk MC-90 cups/ 4oz ea21602160180JUICE
2022JanuarySTARWAT0182 Watermelon FJ 90pk MC-90 cups/ 4oz ea108010800.540JUICE
2022JanuaryGOR0001MAN0020151015100.540FrozenIce
1 ACCEPTED SOLUTION
AbbasG
Memorable Member
Memorable Member

@Ice1341 Hi, here is my possible solution. Hope it helps.

Steps:

1. I have created a conditional column based on the product line.

IF JUICE then  40 else by 80 (So that it give me the right number to divide by qty)

AbbasG_0-1667095442437.png

2. Then I simply used the divide function to create a calculated column to get the pallets count.

AbbasG_1-1667095481478.png

In case you need to refer to the pbix file, here it is



 

View solution in original post

2 REPLIES 2
YukiK
Impactful Individual
Impactful Individual

Could you create a calculated column with your conditions?

AbbasG
Memorable Member
Memorable Member

@Ice1341 Hi, here is my possible solution. Hope it helps.

Steps:

1. I have created a conditional column based on the product line.

IF JUICE then  40 else by 80 (So that it give me the right number to divide by qty)

AbbasG_0-1667095442437.png

2. Then I simply used the divide function to create a calculated column to get the pallets count.

AbbasG_1-1667095481478.png

In case you need to refer to the pbix file, here it is



 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.