Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Showing a chart with grouping based on parameter

I have a weekly number of issues, and each issue has a category: device_type, source, priority, site name.

How can I create a graph which shows the number of problems per week, but the splits will be different based on which categoty split I select?

e.g.

For the following graph, I picked a legend: Prio (priority), but I also want the user to pick other and this to update accordingly:

For prio:

For device category:

For site name:

 

  • Anonymous 
    Please use Field Parameter for that. There are tons of videos in Youtube regarding Field Parameter. Learn that concept and use that.

     

    Hope it will help.

     

    Regards

    sanalytics

3 Replies

  • Anonymous 
    Please use Field Parameter for that. There are tons of videos in Youtube regarding Field Parameter. Learn that concept and use that.

     

    Hope it will help.

     

    Regards

    sanalytics

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks sanalytics , I am following a tutorial on youtube and creating the parameter:
      (each of these parameters are categorical

       

      Parameter = {
      ("Device Category",NAMEOF(source[Device_category]),0),
      ("Site Name", NAMEOF(source[SiteName]),1),
      ("Prio", NAMEOF(source[Prio]),2),
      ("Completed", NAMEOF(source[Finished]),3)
      }

       

       

      But this gives me an error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."
      And I don't understand how to fix it in this context.

      Chat GPT tell me to use the following but this does nto work either.

       

      Parameter = {
          ("Device Category", source[Device_category], 0),
          ("Site Name", source[SiteName], 1),
          ("Prio", source[Prio], 2),
          ("Completed", source[Finished], 3)
      }

       

       

       

      Do you have a tip what is wrong with it?

      • Anonymous's avatar
        Anonymous
        Not applicable

        I got it to work with picking fromt he ribbon "New parameter" rather than typing, and it looks the same to what I wrote, and this one works:

        Parameter = {
            ("Device_category", NAMEOF('source'[Device_category]), 0),
            ("Finished", NAMEOF('source'[Finished]), 1),
            ("Prio", NAMEOF('source'[Prio]), 2),
            ("SiteName", NAMEOF('source'[SiteName]), 3),
            ("Source", NAMEOF('source'[Source]), 4),
            ("OTD", NAMEOF('source'[OTD]), 5)
        }