Forum Discussion

JoseTomas's avatar
JoseTomas
Frequent Visitor
2 years ago
Solved

Finance Result on Matrix Visualization / DAX MEASURES /

Hi guys! I need your help with a measure... This is my goal,  creating a  Finance report on a Matrix visualization, for example... Total Revenue          $1000      Revenue1           $500   ...
  • AlexisOlson's avatar
    2 years ago

    Your data source has redundant data. I'd recommend removing the extra rows and adding a grouping column so that it looks like this:

     

    Sample M you can past into a new blank query:

    let
      Source = Table.FromRows(
        {
          {"Total Revenue", 1, 1000}, 
          {"Revenue 1", 2, 500}, 
          {"Revenue 1.1", 3, 300}, 
          {"Revenue 1.2", 4, 200}, 
          {"Revenue 2", 5, 500}, 
          {"Revenue 2.1", 6, 400}, 
          {"Revenue 2.2", 7, 100}
        }, 
        type table [Item = text, Key = number, Total = number]
      ),
        #"Filtered Rows" = Table.SelectRows(Source, each Text.Contains([Item], ".")),
        #"Added Custom" = Table.AddColumn(#"Filtered Rows", "Group", each Text.BeforeDelimiter([Item], "."), type text)
    in
      #"Added Custom"

     

    Without the redundant information, everything sums up nicely.