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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LokambaTH
Helper I
Helper I

Need help in Query preparation- paginated report..

Hi All,

 

I am using below query to create a paginated report. 

When i run the query getting syntax error. Could you please provide some solution.

 

LokambaTH_0-1675859153170.png

 

Thank you.

 

6 REPLIES 6
amitchandak
Super User
Super User

@LokambaTH , Try like

 

Define
Var BeignDate=Cast('ContractData'[SNAPSHOT_BEGIN_DATE] as date)
Var EndDate= Cast('ContractData'[SNAPSHOT_END_DATE] as Date)

EVALUATE SUMMARIZECOLUMNS('ContractData'[ACCOUNT],

FILTER(VALUES('ContractData'[OVER 90]),'ContractData'[OVER 90]="YES" && ContractData[CO_NAME] = @ContractDataCONAME),

FILTER('ContractData', @Date>=BeignDate && @Date<=EndDate))

amitchandak
Super User
Super User

@LokambaTH , Please share the query in text format with the error. Difficult to tell with image

@amitchandak ,

 

Please see the below query used in report along with error measage. (removed some columns here) 

 

Define
Var BeignDate=Cast('ContractData'[SNAPSHOT_BEGIN_DATE] as date)
Var EndDate= Cast('ContractData'[SNAPSHOT_END_DATE] as Date)

EVALUATE SUMMARIZECOLUMNS('ContractData'[ACCOUNT],

FILTER(VALUES('ContractData'[OVER 90]),'ContractData'[OVER 90]="YES"),
RSCustomDaxFilter(@ContractDataCONAME,EqualToCondition,[ContractData].[CO_NAME],String),

FILTER('ContractData', @Date>=BeignDate && @Date<=EndDate))

 

LokambaTH_0-1675866071461.png

 

@amitchandak  thank you so much for soultion. but the problem is in date conversion and last filter syntax. if i removed last filter line, query works fine. 

@LokambaTH , like

FILTER('ContractData', datevalue( @Date) >=BeignDate && datevalue( @Date)  <=EndDate))

 

else we need create date based on format

@amitchandak   used above syntax , now i am getting below issue:

LokambaTH_0-1675929319059.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.