Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 18011

DAX Question MAX Date Record

$
0
0

Hi This is a DAX question i have 2 tables and they are
tblA has a one to many relation with tblB   tblB is a Fct table and tblA a Dim table
TblA (DIM)
aKey  , aName , ....
   1       a
    2     b
 
tblB (FCT)
bKey  aKey   bName    bDate (number format)   fieldA   Field B
  1        1          b 1        20120101                          1            2
  2        1          b 1        20130101                          3            4
  3        2          b 2        20090101                          1            0
  4        2          b 2        20160101                          3            2
 
 
 
How can i get a table output using DAX with the result of the
  1- the last date for each record
  2- If Field A> Field B then "Red" else "Green"
 
  2        1          b 1        20130101     GREEN
  4        2          b 2        20160101     RED
 
I need the DAX for that , Thanks

 and do i add the DAX in the FCT of the DIM ?

 

I am using Excel 2013 PowerPivot


Viewing all articles
Browse latest Browse all 18011

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>