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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Your opinion on naming Measure same as Field

What's your opinion as to whether it's a good or bad practice to give a measure the same name as a Field?  Given that you can now use Measures in expressions it seems a duplicate name could make an expression confusing to read.  I'm thinking of flagging this condition a a bad practice in Document Analyzer. 

What's your opinion and experience?  Do you ever name Measures the same as Fields? Like Sales & Sales?

Thanks,
Rob

3 Replies
ArnadoSandoval
Specialist II
Specialist II

Hi @rwunderlich 

It is very poor practice to use the same name for a Measure and a Field, it will lead to a very messy application and in the long run a Qlik's site.

hth

 

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
marcus_sommer

Some years ago I avoided it intentionally by applying multiple field-name rules by adding different prefixes/suffixes for keys, flags, measures and so on whereby measures got a # as prefix.

Later I removed this logic again because it's not easy to implement it in a consistent way especially by many various ad-hoc reports and a lot of quick & dirty adjustments which were later rather seldom cleaned and (well) documented (it's definitely not a good practice but so life is …). Further there were some confusion on the user side and repeating explanations to what and why. Therefore I had more efforts as benefits by such an approach and yes it resulted in multiple cases where the measure label and the field-name are identically. Of course it has some disadvantages but nothing what really caused problems or bigger efforts - especially as I use measure-references rather seldom and if mostly per column().

Therefore I would more tend to inform the user that this behaviour may have disadvantages but not valuing it as good or bad practice.

ps. it's a pure QlikView logic - with master-items in Sense it may be different ...

- Marcus

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP
Author

I can relate to the challenges of doing something consistently, especially over the years. 

Yes, in Qlik Sense it does get a bit more complicated because of Master Measures.  In the expression:

Sales - Margin

"Sales" could refer to a Field, Variable, Master Measure or a column label in the chart.  Coloring in the expression editor identified which, but still may be confusing at first glance. 

-Rob