Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
lruffin76
Contributor
Contributor

Calculating % Mix for two separate categories within one dimension

Hello,

I am looking for help with a formula to calculate my % mix of RO Count (Measure) within two categories of one dimension. You will see in the screen shot that I have a dimension field that sorts vehicle makes into two categories, Luxury and Non-Luxury. I am wanting to calculate % mix of RO Count for each vehicle make within it's own category, not for the overall total.

lruffin76_0-1672759013068.png

 

Any help is greatly apprecaited!

Labels (1)
3 Replies
vinieme12
Champion III
Champion III

You can can achieve that using the TOTAL Keyword in your aggregation function

example

=sum(Sales)/Sum(TOTAL <Department> Sales)

incase of multiple dimensions 

=sum(Sales)/Sum(TOTAL <Department,Store> Sales)

 

refer

https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Examples%20of%20A...

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
lruffin76
Contributor
Contributor
Author

Hello, this didn't work for me. If it helps, here is an excel example of what I am needing.

lruffin76_1-1672843883761.png

 

jbhappysocks
Creator II
Creator II

You need to add Luxury/Non-Luxury as a dimension in you load script instead of having it as a calculated dimension in the table. Then you will be able to use the suggested solution, something like this:

=count(RO)/Count(TOTAL <YourNewDimension> RO)