Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated Dimension in Bar chart

Hi Community,
I wnat to create a chart with two dimensions(Report Month, Category) , Category contains one calculated Value (NICO)
Now Dimensions are : Report Month
                     Category_Name(Dispute, Legal Dispute, Collectible, NICO --> Calculated value in Script as below)


For the calculated dimension i created a dummy Dimension at backend by using Inline function

Load *Inline[
CategoryName, Category
Dispute, Dispute
Legal Dispute, Legal Dispute
Collectible, Collectible
, NICO
];

So by this i can able to get the NICO in Category. But the problem arises while assigning a value for NICO.

Expression used :
=if(Category='NICO',sum({<CompanyID={'C0,'c1','C2'}>}Amount),sum(Amount))

1 Solution

Accepted Solutions
chrismarlow
Specialist II
Specialist II

I am still struggling with exactly what you need. If you simply want to reclassify those 3 CompanyIDs as NICO then I think the attached might be a step towards that.

View solution in original post

12 Replies
chrismarlow
Specialist II
Specialist II

I am not sure I follow. Is 'CategoryName' in your table with CompanyID & Amount, in which case your inline table won't join properly, you would need to get the possible CategoryNames for NICO and include in your inline.

MK_QSL
MVP
MVP

Try

=If(IsNull(CategoryName),

     SUM({<CompanyID={'C0,'c1','C2'}>}Amount),

     SUM(Amount)

)

Not applicable
Author

NICO is not a Category but still i want this to be appear in Chart, That's why i created a calculated dimension

Not applicable
Author

No, It's not displaying. Instead of giving SUM({<CompanyID={'C0,'c1','C2'}>}Amount), I tried giving one value "50.16". That time, It shows the value for Report_Month = null value. but not showing for other report months.

MK_QSL
MVP
MVP

Can you provide sample apps please?

chrismarlow
Specialist II
Specialist II

I am still struggling with exactly what you need. If you simply want to reclassify those 3 CompanyIDs as NICO then I think the attached might be a step towards that.

Not applicable
Author

See if this works. sum({<CompanyID={'C0,'c1','C2'},Category=>}Amount)

manojkulkarni
Partner - Specialist II
Partner - Specialist II

not getting exactly to your problem. can you upload your app here.

Anonymous
Not applicable
Author

sum({<Category={'NICO'},CompanyID={'C0,'c1','C2'}>}Amount)