Skip to main content
Solved

Error: Cannot access modalities of List 'Budget 2024' through Property 'Load Type' because it is not unique

  • September 20, 2024
  • 6 replies
  • 178 views

  • Apprentice Author

Hi people, I’m trying to create this metric when I receive the error:  

 

'Budget 2024'.Amount['Budget 2024'.'Load Type'IN ('Budget 2024'.'Load Type'."Budget TopLine",'Budget 2024'.'Load Type'."Budget Other Costs")][BY SUM: 'Budget 2024'.'Country Input'.'Country Pigment', 'Budget 2024'.Month, 'Budget 2024'.Product, 'Budget 2024'.Service, 'Budget 2024'.'Budget Line']
+
'Budget 2024'.Amount['Budget 2024'.'Load Type'= 'Load Type'."Budget OpEx"][BY SUM: 'Budget 2024'.Month,'Budget 2024'.'Budget Line'][BY: 'Product Input'."TBD", Service.Name."TBD", 'Country Pigment'."Unallocated Country"] 

 

I highlighted in red what Pigment is displaying, but I have no idea what’s going on. 

 

I wil really appreciate any help. 

Best answer by Lehtohen

Hey Vico, 

Just try the following:

'Budget 2024'.Amount[FILTER: 'Budget 2024'.'Load Type' IN ('Load Type'."Budget TopLine",'Load Type'."Budget Other Costs")][BY SUM: 'Budget 2024'.'Country Input'.'Country Pigment', 'Budget 2024'.Month, 'Budget 2024'.Product, 'Budget 2024'.Service, 'Budget 2024'.'Budget Line']
 

In the IN-statement you want to reference only items in a dimension list so you don’t want to add the “Budget 2024” in there. 

 

Below is a screenshot from an example metric:

 

Hope this helps :)

6 replies

Lehtohen
Master Trendsetter
Forum|alt.badge.img+2
  • Master Trendsetter
  • Answer
  • September 22, 2024

Hey Vico, 

Just try the following:

'Budget 2024'.Amount[FILTER: 'Budget 2024'.'Load Type' IN ('Load Type'."Budget TopLine",'Load Type'."Budget Other Costs")][BY SUM: 'Budget 2024'.'Country Input'.'Country Pigment', 'Budget 2024'.Month, 'Budget 2024'.Product, 'Budget 2024'.Service, 'Budget 2024'.'Budget Line']
 

In the IN-statement you want to reference only items in a dimension list so you don’t want to add the “Budget 2024” in there. 

 

Below is a screenshot from an example metric:

 

Hope this helps :)


  • Author
  • Apprentice Author
  • September 23, 2024

Hi! 

 

It’s working now, but it says this: 

Maximum cardinality exceeded (62,568,518,769 > 1,000,000,000)

Does it mean that I need to add more dimensions?

 

Vico

 


CDALMAY
Master Helper
Forum|alt.badge.img+14
  • Master Helper
  • September 23, 2024

Hi @Vico,

Maybe this is because your metric structure isn’t matching the dimensionality of your formula. You might have  formula warning specifying which dimensions have been added and which have been removed if any.

You can use the formula playground and past your formula inside it, it will automatically evaluates the dimensions needed based on the properties of your transaction list 'Budget 2024'.

In your case you should have the following dimension : ‘Country Pigment’ , ‘Month’, ‘Product’, ‘Service’, ‘Budget Line’

Hope this helps,


  • Author
  • Apprentice Author
  • September 24, 2024

It worked  @CDALMAY!!! you’re awesome!!!

 

Thank you so very much!


Benoit
Community Manager
Forum|alt.badge.img+15
  • Community Manager
  • September 25, 2024

Just a small note to tell you how much we, at Pigment, enjoy reading this kind of conversations where users are helping other users! This is simply why we created this Community! 😊

Many thanks to all of you! Keep rocking! 🎸


  • Author
  • Apprentice Author
  • October 3, 2024

hey @Lehtohen,

 

I just encountered the same error with a different metrics and thanks to your example I could quickly solve it!!

 

thank you so much!