Forum Discussion
Pivot table two lines should be one
- Feb 01, 2022
LorneS
Creating PivotTable add data to data model and add calculated columnas
= VAR agnt = Range[Agent] RETURN CALCULATE ( CONCATENATEX ( VALUES ( Range[Name] ), Range[Name], ", " ), ALL ( Range ), Range[Agent] = agnt )
Use it in PivotTable:
LorneS
Creating PivotTable add data to data model and add calculated column
as
=
VAR agnt = Range[Agent]
RETURN
CALCULATE (
CONCATENATEX ( VALUES ( Range[Name] ), Range[Name], ", " ),
ALL ( Range ),
Range[Agent] = agnt
)
Use it in PivotTable:
Hi Sergei, I found this page through a google search. I'm experience a similar issue as the original poster, but I'm having some difficulty following the steps you mentioned? I know this is an old thread but I was hoping you could help?
What I'm trying to accomplish is having one single line per unique identifier, and to populate the other columns. However, because the source data has two lines for "100007", the Pivot table is displaying separate lines (for the same unique identifier).
For instance, 100007 (row 4), should only have one line, where Aug 21 through Jan 22 = Andressa, and Feb 22 through Dec 22 = Hady. Since the number of "duplicate" lines are in the thousands, it's not practical to fix manually (at the original data source level) line by line. I'm not sure what is the best work-around for this? Any help would be greatly appreciated! Thank you so much.
- SergeiBaklanJan 03, 2023Diamond Contributor
Perhaps you may provide small sample file to illustrate an issue. In general the logic with CONCANTENATEX() shall work, it's not clear why it doesn't work in your case.