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: 
sam1508
Contributor II
Contributor II

Set expression with If Statement in a expression

Hello all,

I would like to exclude Region filter from my expression but the below listed expression is not working. I have If condition for an aggregated dimension and trying to exclude Region filter. Please suggest.

= Count({<Region= >} Aggr (If ( Status = 'InProcess', Status <> 'Complete'), Commodities, Commodities))

 

Thanks.

Labels (1)
10 Replies
chrismarlow
Specialist II
Specialist II

Hi,

I am not sure the IF formula here is doing what you think it is doing, for If statement would expect to see 3 parts (maybe 2 if value for false is null) and only 1st part would have a comparison ... if Status=InProcess then automatically Status<>Complete ...

Cheers,

Chris.

sam1508
Contributor II
Contributor II
Author

Hello,

Yes, you are correct. It is not doing the desired behavior. I would like to write an expression in which I want to count 'InProcess' status for a Commodity if the status is not Completed. There may be additional records for the  3rd Status (Void) for that Commodity but I don't have to account for that . Can you please suggest the right expression. I wrote the below expression, it is not giving me the desired count and Region filter is also working which I don't want. 

= Count({<Region= >} Aggr (If ( BCet_Status = 'InProcess' and BCet_Status <>'Complete' or BCet_Status = 'Void' , BCet_Status ), B_Commodities, B_Commodities))

Thanks,

Sam

anat
Master
Master

 

aggr(count({<Region=,Status={'InProgress'}>}Commodities),Commodities)

 

sam1508
Contributor II
Contributor II
Author

This is not working as expected. It won't check for other records for the same commodity with different Status. I would like to write an expression in which I want to count 'InProgress' status for a Commodity if the status is not Completed. There may be additional records for the  another Status (Void) for that Commodity but I don't have to account for that .

Also, it should count all the distinct InProgress commodities once if the condition satisfies. For below table, 

Comm1 doesn't have Complete Status so it should get counted as 1 for InProgress

Comm2 doesn't have InProgress status so it won't get counted.

Comm3 has Complete and InProgress both so we don't need to count as it is already Completed

Comm4 has InProgress so we need to count it as 1

So, total InProgress Status count for the below table is 2. Hope this example helps 

 

Commodities Sub Commodity Status
Comm1 SC1 Void
Comm1 SC2 InProgress
Comm1 SC3 InProgress
Comm2 SC1 Void
Comm2 SC2 Complete
Comm3 SC1 Complete
Comm3 SC2 InProgress
Comm4 SC1 InProgress
Shepherd69
Contributor III
Contributor III


@sam1508 wrote: MCDVOICE

Hello all,

I would like to exclude Region filter from my expression but the below listed expression is not working. I have If condition for an aggregated dimension and trying to exclude Region filter. Please suggest.

= Count({<Region= >} Aggr (If ( Status = 'InProcess', Status <> 'Complete'), Commodities, Commodities))

 

Thanks.


Modifiers are used to make additions or changes to a selection. Such modifications can be written in the set expression. A modifier consists of one or several field names, each followed by one or several selections that can be made in the field. Modifiers begin and end with angle brackets, <>.

chrismarlow
Specialist II
Specialist II

Hi,

Missed this, maybe;

20220215_1.png

Then just cancel your region selection as I think you got.

Cheers,

Chris.

bennypal
Contributor
Contributor

If your carrier allows it, you can view your APN settings in one of the following locations: Settings > Cellular > Cellular Data Options > Cellular Network. Settings > Mobile Data > Mobile Data Options > Mobile Data Network

 

safiradara
Contributor
Contributor

The information you provided is correct. If your carrier allows it, you can view and edit your Access Point Name (APN) settings on your mobile device in one of the following locations, depending on your device and its operating system:

  1. Settings > Cellular > Cellular Data Options > Cellular Network: On iOS devices (e.g., iPhones), you can find the APN settings under these menu options.

  2. Settings > Mobile Data > Mobile Data Options > Mobile Data Network: On iOS devices, you can also access the APN settings through these menu options.

It's important to note that not all carriers or mobile devices allow users to modify the APN settings. These settings are typically configured automatically when you insert a SIM card from your carrier. However, in some cases, you may need to access and modify these settings if you are using a non-standard or unlocked device or if you are experiencing connectivity issues. Always follow your carrier's instructions or contact their customer support for guidance on APN settings if needed.

Source:
Teknopediia
softonebrowser

nisafitri
Contributor
Contributor

As we conclude this article, it becomes evident that WhatsApp Mod Image Resolution brings several advantages and potential risks. Wise and responsible users can harness its outstanding features to enrich their communication experiences. However, it's essential to always understand the associated risks and use modifications wisely. With awareness and knowledge, ngobrol games WhatsApp Mod Image Resolution can serve as a tool that enhances creativity and user experience in instant messaging. Happy exploring and communicating better!