Hello David,
adding to the solution proposed by Robert:
total() has options to sum for report or for keys, e.g.
* total( [VALUECOLUMN] for report) ... would calculated the total for the overall report
* total( [VALUECOLUMN] for [COUNTRY]) ... would calculate a sum per each COUNTRY and so forth for CURRENCY, COLOR, SIZE, ... you can also nest them
Those totals of course get filtered as you described before.
So, Robert's proposal is the way to go for.
And glad to see that it worked for you.
------------------------------
Ralf Roeber
https://linkedin.com/in/ralf-roeber/------------------------------
Original Message:
Sent: Fri May 20, 2022 05:30 AM
From: David GOMEZ PRIETO
Subject: Blocking a value to create a constant
Hi Robert,
It was for a dashboard, the total([DUREELOCATION]) seems to work,
Thank you very much for your help
Have a good day :)
------------------------------
David GOMEZ PRIETO
Original Message:
Sent: Fri May 20, 2022 05:05 AM
From: Robert Dostal
Subject: Blocking a value to create a constant
Hi David,
without knowing your exact data model and your report I can only suggest some general solutions.
If it's a report, I recommend creating two queries. One for your data incl. filters and another one that only computes the right value for DUREELOCATION. Then join or link those queries together with a real or surrogate key.

Query "Overall AVG Quantity" holds your average, total min/max or whatever calculated measure value and the key column. Query "data" holds all other necessary data columns and the key column for the join.
In my sample I get product lines filtered by country and their quantity from "data" and the overall total without any filtering from "Overall AVG Quantity". The result:
I can filter each country but the overall total for quantity will always be 89,237,091.
Another way would be to use induced SQL by writing local SQL directly in one data item of the query but I can only recommend that if you really know what you are doing here.
If the basic filters of your data query should apply to your fixed value, you can write total([DUREELOCATION] for report). You will get the overall sum for all values visible in the report but with background filters applied.

------------------------------
Robert Dostal
Team Leader BI
GEMÜ
Ingelfingen
Original Message:
Sent: Fri May 20, 2022 04:33 AM
From: David GOMEZ PRIETO
Subject: Blocking a value to create a constant
Hello,
Exactly, they are different values that add up. But to make the rate I need that the sum of all of them is always the same to be able to divide and that it does not change according to the filters (but that if new lines are added this maximum changes). It would be like fixing (making a constant) the sum of all values.

Best regards,
------------------------------
David GOMEZ PRIETO
Original Message:
Sent: Thu May 19, 2022 01:57 PM
From: Mark Fry
Subject: Blocking a value to create a constant
Hi,
From the looks of the icon, DUREELOCATION is a measure not an attribute. I would be looking closely at the underlying data to see what values exist in this item on each row. Should every row have the same value? My guess is the values are being aggregated in your report, and therefore when you change the rows returned, the aggregate value is different?
Cheers!
MF.
------------------------------
Mark Fry
Technical Consultant
Original Message:
Sent: Thu May 19, 2022 09:05 AM
From: David GOMEZ PRIETO
Subject: Blocking a value to create a constant
Good afternoon,
I would like to know how I can create the value of a constant attribute without being affected by the filters.
For example, I have this attribute that is equal to 4331, but when I use a filter it changes.

I want to calculate a rate, and I need this value to be always the same, but without writing its numerical value by hand. That is to say, if one day this value changes, it would be updated, but the filter would still not affect it. I want to create a measure, but I don't know how to do it.
I don't know if I'm making myself understood
Best regards,
------------------------------
David GOMEZ PRIETO
------------------------------
#CognosAnalyticswithWatson