Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Get total from fact by ignoring a specific dimension

Given that "Fact Sale" does not have "Combo" dimension but "Fact Combo" does, how can I get the total units_sold from it (see screenshot below)?

I've tried to ignore "Combo" dimension by using the "Total" keyword but it doesn't return anything:

 

sum({<fact_type={'Fact Sale'}>} total <category,product> units_sold)

 

image.png

1 Solution

Accepted Solutions
Highlighted

Re: Get total from fact by ignoring a specific dimension

in that case, this should have worked

sum({<fact_type={'Fact Sale'}>} total <category,product> units_sold)

or may be you need by just category or product?

sum({<fact_type={'Fact Sale'}>} total <category> units_sold)

or

sum({<fact_type={'Fact Sale'}>} total <product> units_sold)

View solution in original post

7 Replies
Highlighted
Master II
Master II

Re: Get total from fact by ignoring a specific dimension

Hi,

Try like this,

sum(Total {<category=,product=,fact_type={'Fact Sale'}>} units_sold)

 

Highlighted

Re: Get total from fact by ignoring a specific dimension

This

Sum({<fact_type={'Fact Sale'}>} TOTAL units_sold)
Highlighted
Partner
Partner

Re: Get total from fact by ignoring a specific dimension

@sunny_talwar that's close.

I've updated the screenshot to include two products.

How could I get the subtotal for each product from "Fact Sale" (see blue and green highlights) instead of the overall total?

Highlighted
Partner
Partner

Re: Get total from fact by ignoring a specific dimension

unfortunately the user will need to be able to filter by Product and Category so they can't be ignore from the set analysis.

Highlighted

Re: Get total from fact by ignoring a specific dimension

in that case, this should have worked

sum({<fact_type={'Fact Sale'}>} total <category,product> units_sold)

or may be you need by just category or product?

sum({<fact_type={'Fact Sale'}>} total <category> units_sold)

or

sum({<fact_type={'Fact Sale'}>} total <product> units_sold)

View solution in original post

Highlighted
Partner
Partner

Re: Get total from fact by ignoring a specific dimension

thanks @sunny_talwar, we were wrecking our head trying to understand why it wasn't working as we had definitely done it in the past.

Just test it on QS June 2019 release and it worked as expected. We'll upgrade our Prod environment which is  currently on QS Nov 2017.

Thanks again,

Highlighted

Re: Get total from fact by ignoring a specific dimension

You can try this in the old version

Aggr(NODISTINCT 
    Sum({<fact_type = {'Fact Sale'}>} units_sold)
, category, product)