Results 1 to 1 of 1

DAX Using a Measure in formula produces a blank and can't see why

Threaded View

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

    DAX Using a Measure in formula produces a blank and can't see why

    I have cross posted this question with MR. Excel ;
    https://www.mrexcel.com/board/threads/dax-measure-used-in-formula-produces-blank-but-not-when-variable.1220151/
    Hi, i have the following measure formula in DAX power pivot to retrieve the previous unit value, I have attached the workbook with examples of each.

    so first to get the previous date ;

    MAXX(
    FILTER(ALL(Table1[Date]),Table1[Date] < IF(HASONEVALUE(Table1[Date]),VALUES(Table1[Date]) ) ),Table1[Date])
    Then ;

    Previous Unit :=
    CALCULATE (
        [Tsales],
        FILTER (
            ALL ( Table1[Date] ),
            Table1[Date]
                = MAXX (
                    FILTER (
                        ALL ( Table1[Date] ),
                        Table1[Date] < IF ( HASONEVALUE ( Table1[Date] ), VALUES ( Table1[Date] ) )
                    ),
                    Table1[Date]
                )
        )
    )
    So I thought I should be able to use the first measure inside the second,

       CALCULATE([Tsales],FILTER(ALL(Table1[Date]),Table1[Date] =  [Previous Date] ) )

    But this just return a blank? Any explanations as to why?
    Attached Files Attached Files
    Last edited by Dicken; 10-24-2022 at 02:18 PM. Reason: Cross Posting

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formula produces different outcomes
    By CLIFFEAT14048 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-21-2020, 05:18 PM
  2. MEDIANIF or MEDIAN and ignore blank cells as a PowerPivot measure?
    By paulosllvn in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-11-2020, 03:53 AM
  3. 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
  4. [SOLVED] my formula produces an error instead of staying blank
    By AshleyB2912 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-15-2016, 11:12 AM
  5. [SOLVED] Counting distinct values with blank cells produces #DIV/0!
    By antexity in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-14-2015, 09:00 AM
  6. [SOLVED] Why the formula with #REF! still produces 0 value
    By alice2011 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-16-2014, 06:12 PM
  7. Formula produces Error
    By treeleaf20 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-10-2009, 05:34 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