Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I've been struggling recently with one of my dashboard as a few of my created elements are not recognized in the way I want them to be. I want to use the created Master-element COSP Budget in a formula for a KPI like this:
However, as you can see, this creates an error message as I believe this is a "kennzahl" instead of a "feld" (german terms).
The formula for this master-element consists of these further master elements:
These master elements, in turn, all have formulas that look like this:
This data comes from the data-editor in a code that looks like this:
So my question is, what part do I need to change in any section, for my created variables to not produce errors in the first picture? Thanks in advance!
Hi!
In your first screenshot, you're using Sum([COSP Budget]) - sum([Betrag offen (LC)]) / Sum([COSP Budget]) * (Month(Today())/12). It’s likely the error occurs because:
[COSP Budget] could be defined as a master measure and not a field. Measures are treated as aggregations, and you cannot use them in certain operations as you would a field.
If [COSP Budget] is not a simple field (but a calculated measure), Qlik might be expecting it to behave differently in expressions.
Check if COSP Budget is a calculated measure. If it is, wrap it with the proper aggregation function (like Sum or Avg) based on your use case.
If [COSP Budget] is a complex formula defined through other master elements, ensure that each element used is also aggregated properly.
In the second and third screenshots, you show the formulas for intermediate master elements. If these elements are again using fields like [COSP.WRTTP] or [COSP.VERSN], and calculations are being performed without proper aggregation functions, you’ll face issues when combining them.
Make sure every component in your formulas is properly wrapped within aggregation functions (Sum, Avg, etc.) and tested for field existence.
In the final screenshot, Double-check the data load script to ensure that all fields used in your master elements are properly loaded and named.
Avoid using similar names for master elements and actual fields to prevent confusion during formula creation.
Hope it helps,
kind regards,
Diego
@DWolsie That's what I mentioned, remove sum() just use [COSP Budget] - sum(Betrag...)
Hi!
In your first screenshot, you're using Sum([COSP Budget]) - sum([Betrag offen (LC)]) / Sum([COSP Budget]) * (Month(Today())/12). It’s likely the error occurs because:
[COSP Budget] could be defined as a master measure and not a field. Measures are treated as aggregations, and you cannot use them in certain operations as you would a field.
If [COSP Budget] is not a simple field (but a calculated measure), Qlik might be expecting it to behave differently in expressions.
Check if COSP Budget is a calculated measure. If it is, wrap it with the proper aggregation function (like Sum or Avg) based on your use case.
If [COSP Budget] is a complex formula defined through other master elements, ensure that each element used is also aggregated properly.
In the second and third screenshots, you show the formulas for intermediate master elements. If these elements are again using fields like [COSP.WRTTP] or [COSP.VERSN], and calculations are being performed without proper aggregation functions, you’ll face issues when combining them.
Make sure every component in your formulas is properly wrapped within aggregation functions (Sum, Avg, etc.) and tested for field existence.
In the final screenshot, Double-check the data load script to ensure that all fields used in your master elements are properly loaded and named.
Avoid using similar names for master elements and actual fields to prevent confusion during formula creation.
Hope it helps,
kind regards,
Diego
Hi Diego,
Thanks for the swift response. I have now double checked to make sure each individual master element is summed as such:
However, when I then try to sum the COSP Budget I get the following error message:
Any idea what the problem could be?
@DWolsie If [COSP Budget] is master measure you don't need to apply any aggregation function over it, actually it is now allowed. You can simply call master measure as is.
Hi Kushal,
Unfortunately, doing so I still get the error message 😞
@DWolsie That's what I mentioned, remove sum() just use [COSP Budget] - sum(Betrag...)
Ahhh thank you so much! It works now!