Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Problem with ALL/ALLSELECTED while creating a heatmap

Hey there.   Here's the file link used for this example: heatmap.pbix    I'm currently working on the creation of a heatmap by using a matrix. In order to do so, I'm trying to retrieve the moment...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous ,

    Please update the formula of your measure [heatmap] as below and check if it can return the correct result. Please find the details in the attachment.

    heatmap = 
    VAR __tbl =
        CALCULATETABLE (
            SUMMARIZECOLUMNS (
                'd_calendar'[week_en_us],
                'd_calendar'[day_name_en_us_with_day_name],
                'd_hours'[day_moment],
                'd_hours'[hour],
                "@count_ticket",[count_tickets]
            ),
            ALLSELECTED(),
            VALUES('d_calendar'[week_en_us])
        )
    VAR __result =
        MAXX ( __tbl, [@count_ticket] )
    RETURN
        __result

    Best Regards