Forum Discussion
haefnja
5 years agoFrequent Visitor
New grouping column
I am looking to add a grouping column that looks at the values in a few different columns to determine the value that should be entered. My data is from a production table that records the good prod...
- 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
selimovd
5 years agoMost Valuable Professional
Hey haefnja ,
the following calculated column should give you the desired result:
Description G =
VAR vRowReferenceID = myTable[ReferenceID]
VAR vDescr =
CALCULATE(
MAX( myTable[ProductDescription] ),
myTable[ProductType] = "G",
myTable[ReferenceID] = vRowReferenceID,
myTable
)
RETURN
vDescr
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 regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic