Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
am using below dax to pass a date selection from query 1 date table into the dax custom column, but it seems like the selection is not working, how can I manage to do this:
Hi @Anmolgan
try a measure
Measure =
var reference_date= SELECTEDVALUE(Query1[FullDateAlternateKey])
return
STARTOFMONTH(reference_date)
or column
Column1 =
var reference_date= CALCULATE(MAX(Query1[FullDateAlternateKey]))
return
STARTOFMONTH(reference_date)
@az38
can I not use this in a custom column? I have a datediff formula date works on the basis of this dax and that goes like this:
@az38 so I am trying to calculate aging bucket on the basis of selection of a date field:
I have a custom column where I convert any selected that to 1st of each month, need to figure out how can I use custom column here:
see my post above.
your Month Measure will look like
Month =
var _effDate = MAX(pcc_view_ar_aging[effective_date])
RETURN
DATEDIFF(_effDate , [Measure], MONTH)
Your New aging bucket measure will be similar with
New aging bucket =
var _Month = [Month]
var _effDate = MAX(pcc_view_ar_aging[effective_date])
RETURN
SWITCH(TRUE(),
MONTH(_effDate) = MONTH([Measure11]) && YEAR(_effDate) = YEAR([Measure11]) && _effDate <= TODAY(), "Current",
_Month > 0 && _Month <= 12, CONCATENATE(30 * _Month, " Days"),
"greater than current month aging"
)
@az38 I did not understand this line can you explain a bit, so that I can built the bucket and validate with the actual one in my column.
if you need your visual reacts to slicer you need to create a Measure and not a Column.
I do not completely understand your business logic, as I do not see any examples of data and desired result both. So, I Can not be sure in the correct statements for you
@az38 I have attached an output screenshot of what I am getting when I am creating my bucket and passing a hardcoded date to refersh date, please view the screenshot:
you are trying to implement what-if logic which described here https://docs.microsoft.com/en-us/power-bi/desktop-what-if
it will work with measure
try to re-write your formula as a Measure
Month =
var _effDate = MAX(pcc_view_ar_aging[effective_date])
RETURN
DATEDIFF(_effDate , [Measure], MONTH)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |