Forum Discussion
dogburalHK82
3 years agoHelper III
filter parameter in dax
Hi,
I am trying to filter except for 'Late window'.
OTD_PO_Total_Line(OTIF)% ALL = calculate([OTD_PO_Total_Line (OTIF) %], allexcept('Late Window','Late Window'[Late Window]))
This 'Late window' was created from parameter that contains only a single column from 1 to 10.
I have got error like below; obviouse the parameter has a single column. In this case, what is the alternative way to filter all except "Late window"?
8 Replies
- dogburalHK82Helper III
tamerj1 Thank you
- tamerj1Community Champion
Hi dogburalHK82
please clarify how do you want the measure calculation to change with the parameter? Please provide more details about your report and data model.
- dogburalHK82Helper III
PO No.Item NumberOrder DateDue dateReceipt dateOrder quantityReceipt Quantitydays diff
P1 Part_1 1/01/2023 30/05/2023 31/05/2023 5 5 1 P2 Part_2 1/02/2023 30/05/2023 29/05/2023 5 5 -1 P3 Part_3 1/01/2023 30/05/2023 5/05/2023 5 5 -25 P4 Part_4 1/01/2023 30/04/2023 30/05/2023 5 5 30 say, with above raw data, i want to calculate on time delivery of shipment.
I have set 2 parameter, called "early" and "late". With that, below measure has been generated.
OT =var _early = calculate(countA(Table1[Item Number]), filter(Table1, (Table1[days diff])<(-early[early Value])))var _late = calculate(countA(Table1[Item Number]), filter(Table1, (Table1[days diff])>(late[late Value])))var _OT = calculate(countA(Table1[Item Number]), filter(Table1, (Table1[days diff])>=(-early[early Value])&&(Table1[days diff])<=(late[late Value])))var _sum = distinctcount(Table1[PO No.])Return divide(_OT, _Sum,0)Now I want to ignore all filters except for "late" and "early" parameter.I would like to how to set a measure.- tamerj1Community Champion
dogburalHK82
Pleasr tryCALCULATE ( [OT], REMOVEFILTERS ( ) )