Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Debugger doesn't work with ALLSELECTED properly. #669

Closed
edhans opened this issue Sep 22, 2022 · 2 comments
Closed

Bug: Debugger doesn't work with ALLSELECTED properly. #669

edhans opened this issue Sep 22, 2022 · 2 comments
Labels
issue: bug Confirmed as a bug in TE3
Milestone

Comments

@edhans
Copy link

edhans commented Sep 22, 2022

Here is my measure. (this is in a standard Contoso file)

% of Total Sales AllSelected =
VAR varSales = [Total Net Sales]
VAR varAllSales =
    CALCULATE(
        [Total Net Sales],
        ALLSELECTED('Products')
    )
VAR Result =
    DIVIDE(
        varSales,
        varAllSales
    )
RETURN
    Result

It allows me to generate this visual where my total remains 100% no matter what I select. Pretty basic.
image

When I debug this though, either the debugger is wrong, or I am not understanding it. I ran the query and copied it to TE/3.

// DAX Query
DEFINE
  VAR __DS0FilterTable = 
    FILTER(
      KEEPFILTERS(VALUES('Products'[Brand])),
      NOT('Products'[Brand] IN {"Adventure Works"})
    )

  VAR __DS0Core = 
    SUMMARIZECOLUMNS(
      ROLLUPADDISSUBTOTAL('Products'[Brand], "IsGrandTotalRowTotal"),
      __DS0FilterTable,
      "Total_Net_Sales", 'Sales'[Total Net Sales],
      "v__of_Total_Sales", 'Sales'[% of Total Sales],
      "v__of_Total_Sales_AllSelected", 'Sales'[% of Total Sales AllSelected]
    )

  VAR __DS0PrimaryWindowed = 
    TOPN(502, __DS0Core, [IsGrandTotalRowTotal], 0, 'Products'[Brand], 1)

EVALUATE
  __DS0PrimaryWindowed

ORDER BY
  [IsGrandTotalRowTotal] DESC, 'Products'[Brand]

When going through the debugger though, it is not recognizing ALLSELECTED properly.
ALLSELECTED Debuger bug

If you need me to link to the Contoso file I have (200MB) let me know, but I think this is pretty simple to repro.

@otykier
Copy link
Collaborator

otykier commented Sep 22, 2022

Thanks for reporting. We’re aware of this and currently working on a fix.

@otykier otykier added the issue: bug Confirmed as a bug in TE3 label Sep 22, 2022
@otykier otykier added this to the 3.3.6 milestone Oct 14, 2022
@otykier
Copy link
Collaborator

otykier commented Nov 11, 2022

This is now finally fixed in 3.3.6. Thanks for your patience!

@otykier otykier closed this as completed Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Confirmed as a bug in TE3
Development

No branches or pull requests

2 participants