Skip to main content

Power BI

 

Calculating the part number count by supplierId using DAX measures


  • Calculating the count of partnumber based on supplierid
Part Count by Supplier = 
CALCULATE(
    DISTINCTCOUNT('Spec Data'[PartID]),
    ALLEXCEPT('Spec Data', 'Spec Data'[SupplierID])
)

Step 2: Create the Calculated Column for Part Count Category

Next, create a calculated column to categorize the part counts into the specified ranges.

Part Count Category = 
SWITCH(
    TRUE(),
    [Part Count by Supplier] < 10, "Less than 10",
    [Part Count by Supplier] >= 10 && 'YourTable'[Part Count by Supplier] <= 50, "10 to 50",
    [Part Count by Supplier] > 50 && 'YourTable'[Part Count by Supplier] <= 100, "50 to 100",
    [Part Count by Supplier] > 100, "Greater than 100",
    "Unknown"
)

Output as below


Comments

Popular posts from this blog

Convex Lens Vs Concave Lens

What is a Lens A lens is a transparent object that transmits light across it, and its working principle depends on the   law of refraction (Snell’s law) . Applications: Concave Lens help with Far-Sight Convex Lens help with Near-Sight

Herbal Plants

Herbal plants to grow in home Different types of keerai ----- http://www.indiandietrecipes.com/2016/03/pictures-of-various-types-of-greens-or.html Pirandai ----good for bone joins---- https://youtu.be/k2DGubyXLAE Valarai Keerai Benifits ----- https://youtu.be/33HIfLJKTqA Sesma seeds ---- https://easyayurveda.com/2011/02/24/sesame-and-sesame-oil-benefits-total-ayurveda-details/

What is Verbal and Non-Verbal communication

TYPES OF COMMUNICATIONS: