Forum Discussion
Joel_Truuvert
6 years agoFrequent Visitor
DAX Nested IF issue
Hi, Having trouble with nested IFs (or if there is another solution that is welcome as well) The aim is to have the outstanding accounts receivable summed by the last day of each month. Th...
- Anonymous6 years ago
Try this
measure=if(selectevalue(table [delivery date]) <= min(date[date]) && selectevalue(table [invoice issue date]) <= min(date[date]) && selectevalue(table [client payment date]) > min(date[date]), sum(table[amount column]),0)
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.check my blog here
https://community.powerbi.com/t5/Community-Blog/Connecting-to-a-Tabular-Model-Using-Power-BI/ba-p/913784
Anonymous
6 years agoNot applicable
Hi Joel_Truuvert ,
You can try out below piece of code:
SUM_Value =
// Get slicer selected date (if more than 1 or none selected take latest available
var vSelectedDate = SelectedValue(SlicerDateTable[Date],Max(SlicerDateTable[Date]))
Return // Calculate the thing
Calculate(
Sum(Table[SUM]) //Calculate the total
,
Table[Delivery Date] <= vSelectedDate // IF delivery date <= slicer selected date
,
Table[Invoice Date] <= vSelectedDate // IF invoice issue date <= slicer selected date
,
Table[Payment date] > vSelectedDate //IF client payment date > slicer selected date
)
+ 0 //if any are not true then do not summarize / count as 0 for that row.