Forum Discussion

Vanu's avatar
Vanu
New Member
1 year ago

row content

Hi All,

I have a final table which category,type and executive summary.

Category - ( Each Category has type 1 and type 2 each category and type has repeated executive summary as per the below table.

I want to sort the executive summary as per the customisation hence i created a new sorting table and concatenate the category and executive summary by giving space in the executive summary for the category and not any more space in final table and i have given many to one relationship using concat

for Eg

chair_model(No space at last)

table_model (One space at last)

desk_model  (2 space at last

 

  Executive summary
CategoryTypeType 1Type 2
ChairType 1
Type 2
Model
Brand
Size
Type
Model
Brand
Size
Type
TableType 1
Type 2
Model
Brand
Size
Type
Model
Brand
Size
Type
DeskType 1
Type 2
Model
Brand
Size
Type
Model
Brand
Size
Type

When i pull the executive summary from the final table the below dax is working but form the sorting table executive summary the value is coming as infinity row level output is infinity where as column level output is coming kindly help

type =
DIVIDE(
   CALCULATE('Dax '[Previous Qtr],
Final[Category]="Chair",Final[type]="type 1",Final[Exec Summary]="model"),
CALCULATE(
Dax '[Previous Qtr],
Final[Category]="Chair",Final[type]="type 1",Final[Exec Summary]="brand"
))
The outpyt should be in either any of the row.
Pls support guys

 

 

3 Replies

  • Hi Vanu , Please try to update your dax measure as below:

    type =
    VAR Model_Value =
    CALCULATE(
    SUM('Dax'[Previous Qtr]),
    Final[Category] = "Chair",
    Final[Type] = "Type 1",
    Final[Exec Summary] = "Model"
    )
    VAR Brand_Value =
    CALCULATE(
    SUM('Dax'[Previous Qtr]),
    Final[Category] = "Chair",
    Final[Type] = "Type 1",
    Final[Exec Summary] = "Brand"
    )
    RETURN
    IF(
    Brand_Value = 0,
    BLANK(), -- Handle division by zero
    DIVIDE(Model_Value, Brand_Value)
    )

  • Vanu's avatar
    Vanu
    New Member

    VAR Model_Value = CALCULATE( SUM('Dax'[Previous Qtr]), Final[Category] = "Chair", Final[Type] = "Type 1", Final[Exec Summary] = "Model" )
    VAR Brand_Value = CALCULATE( SUM('Dax'[Previous Qtr]), Final[Category] = "Chair", Final[Type] = "Type 1", Final[Exec Summary] = "Brand" )
    RETURN IF( Brand_Value = 0, BLANK(), -- Handle division by zero DIVIDE(Model_Value, Brand_Value) )

     

    I could not use sum since value was created in measure.

    i repharse the dax but it is not working

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

    Based on your description, I don't quite understand what you want in the end. Do you need to output the sorting results or do you create a sorting table and ultimately want this sorting result or something else? The data you provided is a matrix. Can you provide some sample data and your expected results in a table?.

     

    Best Regards!

    Yolo Zhu