Forum Discussion
New grouping column
- 5 years ago
Hi,
This calculated column formula works
=CALCULATE(MAX(Data[ProductDescription]),FILTER(Data,Data[ReferenceID]=EARLIER(Data[ReferenceID])&&Data[ProductType]="G"))Hope this helps.
- 5 years ago
Hey haefnja ,
DirectQuery is a big difference.
The problem is not CALCULATE, the CALCULATE function works with DirectQuery. The problems are usually the limits for calculated tables and calculated columns.
In your case add the column in your data source, from my point of view that's the best place to do that for your case.
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
Thanks for the help Ashish_Mathur and selimovd. It looks like it should work, but I ran into an issue I was not expecting. I am using this in DirectQuery mode, since it is a live system that is constantly getting new data entered from the production floor. Since it is DirectQuery, I cannot use the CALCULATE function...any suggestions?
Hey haefnja ,
DirectQuery is a big difference.
The problem is not CALCULATE, the CALCULATE function works with DirectQuery. The problems are usually the limits for calculated tables and calculated columns.
In your case add the column in your data source, from my point of view that's the best place to do that for your case.
- haefnja5 years agoFrequent Visitor
I don't have direct access to the database that is acting as the data source, so if I can't get it into my data source, is there another way I can go about this? Is there a different way to basically say in a new column "For all the same ReferenceID values, take the ProductDescription when ProductType = G"? I think you understand well enough what I am trying to do, I just don't understand why I can't get it to work properly.