Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
3 years ago
Solved

DIFFERENCE ACCORDING TO CATEGORY

I am looking for help to get the difference according to categories.
I have 2 tables:
"Categories": has a category name and its minimum range established
"DDI": calculated table taken from daily inventories / sales that gives results, days of current inventories.
as I get the difference according to the category and its established range minus the days of inv I have
eg.
Category 1 min set 30 - DDI 10 = -20

TABLE CATEGORIES:

CATEGORY INV EIGHT

CATEGORY 1 30

CATEGORY 2 30

CATEGORY 3 20

CATEGORY 4 15

DDI TABLE

CATEGORY DDI(INVENTORY DAYS)

CATEGORY 1 10

CATEGORY 2 35

CATEGORY 3 18

CATEGORY 4 25

With the result I will use it to generate ranges for conditional filto with the following measure:

SWITCH(
TRUE(),
[]<=0,"white",
[]<=7,"white",
[]<=20,"black",
"white")
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Syndicate_Admin ,

     

    I suggest you to create a relationship between two tables.

    Measure:

    Diff = SUM('INVENTORY DAYS'[DDI]) - SUM('TABLE CATEGORIES'[INV EIGHT])

    Color Measure:

    Color =
    SWITCH (
        TRUE (),
        [Diff] <= 0, "white",
        [Diff] <= 7, "white",
        [Diff] <= 20, "black",
        "white"
    )

    Use conditional formatting in cell element.

    Result is as below.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Syndicate_Admin ,

     

    I suggest you to create a relationship between two tables.

    Measure:

    Diff = SUM('INVENTORY DAYS'[DDI]) - SUM('TABLE CATEGORIES'[INV EIGHT])

    Color Measure:

    Color =
    SWITCH (
        TRUE (),
        [Diff] <= 0, "white",
        [Diff] <= 7, "white",
        [Diff] <= 20, "black",
        "white"
    )

    Use conditional formatting in cell element.

    Result is as below.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.