Power BI: Add Grand Total Row in the bar visual
Objective: Want to show grand total in Bar visual
To achieve this, I do not want to add additional rows to my fact table. So I decided to use the additional dimension table approach. The one, I used for the single slicer with all in the video below
My model has a Sales fact joined to dimensions Item, Geography, Date, and Customer.
We have a measure [NET] in the schema
net = [Gross] -[Discount]
Gross = Sum(Sales[Gross Sales Amount])
Discount= Sum(Sales[Discount Amount])
In this example I wanted to show all when I display data by Brand, so created a new table
Brand All = Union( SUMMARIZE('Item','Item'[Brand], "All Brand", max('Item'[Brand])) ,
SUMMARIZE('Item','Item'[Brand], "All Brand", "All")
)
There are two columns, Brand and All Brand. “All brand” column has two entries for each brand; one with the name and another with All. Example below
Join this new table with the Item table. Single directional, filter Item
Visual with Item Brand
Visual with Brand All
In the second visual I am using Net, So I am getting a sum total. Can I get Avg total like the one given below? Comment and tell me the formula of the measure: Net with Avg GT
You can also watch a video on the same topic
You can use the single select file from git to build this example.
Click Here to access all my blogs and videos in a jiffy via an exclusive visual glossary using Power BI.
Please like, share, and comment on these. Your suggestions on improvement, challenges, and new topics will help me explore more.
You Can watch my Power BI Tutorial Series on My Channel, Subscribe, Like, and share