+ Reply to Thread
Results 1 to 1 of 1

DAX use of Measure direct or as Variable

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    804

    DAX use of Measure direct or as Variable

    Hi
    Workbook examples attached.

    Can someone explain the difference as to why one works and one doesn't;

    I'm adding an index to some values in power pivot using DAX, the formula


       OneV:=IF(HASONEVALUE(Table1[Test]),VALUES(Table1[Test]))
    This is then used as var in ;

     OneV VAR:=VAR onev = [OneV]
                                           RETURN 
                                          CALCULATE([CountR],FILTER(ALL(Table1[Test]),
                                                                                ISONORAFTER(Table1[Test],onev,DESC)))

    My question is that if I just use the measure directly, not as a variable first, i ceases to work?

    Measure used  OneV:=CALCULATE([CountR],FILTER(ALL(Table1[Test]),ISONORAFTER(Table1[Test],[OneV],DESC)) )
    if I type the 'if onevalue' into the formula it all works again, what's happening?

    Richard.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Pivot Table: Grand Total different measure from Column measure
    By chinneywow in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-07-2019, 06:22 AM
  2. Replies: 3
    Last Post: 02-14-2014, 01:09 AM
  3. How to get only Direct Precedents
    By Anil K Goel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-22-2014, 01:33 PM
  4. Replies: 2
    Last Post: 09-19-2013, 09:06 AM
  5. direct link
    By mohan.r1980 in forum Excel General
    Replies: 1
    Last Post: 11-17-2010, 04:21 AM
  6. VBA print direct
    By OptionTrader in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2010, 10:48 PM
  7. How to direct a path name in VBA
    By crieken in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2008, 02:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1