Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Need Assitance in DAX code

HI All, 

 

I have a table (Remittance_Raw) which has all my data to display in the visuals.. 

 

I have written a DAX query to derive a New table based on four filter conditions.. here is where the problem, among the four, first three conditiosn are working and the fourth one is not working.. 

 

I would like to know where and what I am mistaking.. 


please find the codes for your refernces. 
Filter 1:  (A calculated column in Remittance_Raw table) this is working in PreResults DAX Code

FilterAmount = IF(FIXED(Remittance_Raw[Remittance.Amount_Orig] - Remittance_Raw[AllocationAmount_O],0,1)="0",0,1) 

Filter 2:  (A calculated Measure in Remittance_Raw table) this is working in PreResults DAX Code

 

DateAllocation1 = IF(MIN(vwAllocation1[vwFactAllocation.Date]) <= [SelectedValue], 1, 0)

Filter 3: (A calculated Measure in Remittance_Raw table) this is working in PreResults DAX Code

DateAllocation2 = IF(MIN(vwAllocation2[vwFactAllocation.Date]) <= [SelectedValue], 1, 0)

Filter 4: (A calculated Measure in Remittance_Raw table) this is not working in PreResults DAX Code.. 

DateRemit = IF(MIN(Remittance_Raw[Remittance.EOMDate])<=CalcMeasure[SelectedValue],1,0)


PreResults DAX Code:

PreResults = 
CALCULATETABLE(
        Remittance_Raw,  
         FILTER(Remittance_Raw, 
                    Remittance_Raw[FilterAmount] = 1 
                    && Remittance_Raw[DateAllocation1] = 1 
                    && Remittance_Raw[DateAllocation2] = 1 
                    // && Remittance_Raw[DateRemit] = 1  // This is Not Woriking
                )
        )

 

Please help me how can I make this to work for me.. 

Additional info: 

 

I also have the below data tables. 
CalcMeasure
vwAllocation1

vwAllocation2

Many thanks for your kind help. 

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

@Anonymous,

 

The pattern of fourth measure seems like the previous three measures, what do you mean "Not work?" Could you share more details about your expected result and table structure? For example, what's the relationship and direction between the three tables. To be general, if you have multiple slicers or the direction between fact table and dimension table is not single, issues always happen because the slicers' filter will interact with each other, please check them.

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Hi @v-yuta-msft

 

"Not Working" means, 

 

the condition is getting compiled and I am able to see the new calculated table.. but I am not able to see data in it. 

 

if I comment or exclude that fourth condition, then, I am getting the data .. 

 

hope this clarifies your doubt on "Not Working"

 

My question is,  

Why that fourth condition alone not working as expected.. 
why it is not bringing the data even though there are data which satisfy that fourth condition. 

 

 

Thanks, 

Prabhu

Anonymous
Not applicable

@v-yuta-msft

 

 

relationship is 1:* many between

vsAllocation1 - Remittance_Raw

vsAllocation2 - Remittance_Raw

 

No relationship between CalMeasure and any of the other tables in the report. 

Anonymous
Not applicable

FYI, 

SelectedValue = SELECTEDVALUE('CalcMeasure'[EOMDate])

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.