ROLLUP change true/false to be more meaningful

Hi guys
Still developing my paginated report for financials and so far have this.
(Apologies again - either Brian or Greg have explained to me how to paste formatted DAX into here but I seem STILL to have a mental block.)
SUMMARIZECOLUMNS(
Companies[Group],
ROLLUPADDISSUBTOTAL( Companies[Company], “GroupTotal” ),
Reports[RepKey],
Reports[RepLine],
Reports[RepLineDesc],
‘Calendar’[Fisc Sort_MonthYear],
‘Calendar’[Fisc MONTH Year],
KEEPFILTERS(
TREATAS( { “Discount % USA” }, Reports[RepLineDesc] )
),
KEEPFILTERS(
TREATAS( { “Nov 2020” },‘Calendar’[Fisc MONTH Year] )
),
“MTD Act”, [MTD Act]
) TREATAS( { “Discount % USA” }, Reports[RepLineDesc] )
),
KEEPFILTERS
) TREATAS
) { “Nov 2020” },
‘Calendar’[Fisc MONTH Year]
)
),
“MTD Act”,[MTD Act]
)
Which produces this

What I would like is an additional column called Consolidations with logic of
If GroupTotal = True then “Group” (ie value from Group Colum), otherwise blank.

it is likely the case that I will require multiple levels of “ISSUBTOTAL” as this develops, so a column with the “thing” that is being aggregated on would be ideal, and could be parameterised in Pag Reports.

However my real question here is how to take the virtual table above and add a column to it? Once I have that I should be able to manage the rest.

Looking forward to help.

Pete

@BINavPete The code you have pasted is incorrect.

Hi @BINavPete, I noticed you didn’t provide a PBIX file. Providing one will help users and experts find a solution to your inquiry faster and better.

A perfect initial question includes all of the following:

  • A clear explanation of the problem you are experiencing

  • A mockup of the results you want to achieve

  • Your current work-in-progress PBIX file

  • Your underlying data file (to allow us to go into Power Query if necessary to transform your data and/or data model – often DAX questions really end up being data modeling solutions)

Check out this thread on Tools and Techniques for Providing PBIX Files with Your Forum Questions

Not completing your data may sometimes cause delay in getting an answer.

Hi @BINavPete, we’ve noticed that no response has been received from you since July 25th.

We are waiting for the masked demo pbix file, and any other supporting links and details. Kindly send the correct code too.

In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.

Hi guys
PBIX attached and Excel mock up of what I am trying to achieve is attached
AddSubtots.xlsx (12.7 KB)
TestSubTotals.pbix (36.2 KB).

I can get the ROLLUPADDISSUBTOTALS working without any issues via SUMMARIZECOLUMNS. However I am trying to add another column which makes sense of the ISSubtotal Trues and Falses. This column will then act as a parameter in a paginated report.

The DAX here is being written as a data source for a paginated report. If it were part of the PBIX and a physical table, then it would be easy enough to add a calculated column, but that would create a huge table probably bigger than the fact table - so not suitable.

The Consol column in the spreadsheet is a mockup of what I’m trying to do. The AND logic should be straight forward once I have a column to work with.

The Question is how do I reference a virtual table, bring all the data from it and add a column to it?

Look forward to some help

Pete
PS - (only 65 sleeps to retirement! Then spend a bit more time in here helping out with some easier posts!)

Bumping this post for more visibility.

Hi All
Been having a try on this one and can reference cols in from a virtual table with ADDCOLUMNS.
But am unable to reference the ISSUBTOTAL Columns in the ADDCOLUMNS Statement???

Hi Pete,

Not sure why, but for what it’s worth, when I reference “GroupTot” and “DeptTot” within ADDCOLUMNS it works as expected (even though I get a red squiggly line that says “Cannot find name”).

I called the two columns within an IF statement to test it.

test1

Regards,
Aaron

Thanks Aaron.
All good now thanks. I was either too focus on the red wiggly line or having senior moment.
Let’s go for the latter!!

Once again thanks for help

Pete