Forum Discussion

AxiomaticTwo's avatar
AxiomaticTwo
Frequent Visitor
2 years ago
Solved

Debugging DAX Calculations (teach to fish)

I'm in some complicated stuff and I can't visuzualize what is going on under the hood of DAX.  Can you answer or point me to a blog, video, etc. that will allow me to help myself see that what I assu...
  • AxiomaticTwo's avatar
    2 years ago

    Thanks but that is part of the problem. The blogs do a good enough job of explaining the functions but not of showing how to validate functions are working as expected.

    I think I developed some stuff in the last couple of hours that has helped but would love to hear anyone elses tricks patterns they use.

    How to see values of a single column table output, within the context of a dimension?
     - Create table visual, drag a dimension column in first.
     - Create a new measure where you copy paste your table expression.

     - Wrap that table expression in concatentatex.

     - I want to evaluate these results of var _filter so I'll write measure [test_filter]

    --here is the table variable from a much longer measure to evalute in a specific context:
    var _filter = 
           FILTER(
                ALLSELECTED(
                    Month[Fiscal Month Num Of Year]
                ),
                Month[Fiscal Month Num Of Year]
                <= selectedvalue( Month[Fiscal Month Num Of Year], 12 )
            )
    
    --we write a new measure that looks like the following with concatenatex wrapping:
    test5 filterv2 = 
        CONCATENATEX(
            FILTER(
                ALLSELECTED(
                    Month[Fiscal Month Num Of Year]
                ),
                Month[Fiscal Month Num Of Year]
                <= selectedvalue( Month[Fiscal Month Num Of Year], 12 )
            ),
            'Month'[Fiscal Month Num Of Year],
            "-")

     

    The result looks like this: