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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Dip85
Regular Visitor

YTD shows vaules for months beyond current month

 

Capture.JPG Hi 

I am using a direct query to connect to sap hana View.

I have created a quick measure for running total on Credit memo and named it Credit memo YTD. As you see above, the vaues shoould show up only until Month 03 but the toatl si distibuted over rest of the year when there are no values for it. What could be wrong? I am also using  date dimension table and related my date in main table to DATE in date dim table.

 

 

Credit memos = CALCULATE((DISTINCTCOUNT(Query1[BillingDocument])); Query1[BillingType] = "G2" )

 

 

My aim is to compare YTD for this year with last year 

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Dip85,


I am using a direct query to connect to sap hana View.

I have created a quick measure for running total on Credit memo and named it Credit memo YTD. As you see above, the vaues shoould show up only until Month 03 but the toatl si distibuted over rest of the year when there are no values for it. What could be wrong? I am also using  date dimension table and related my date in main table to DATE in date dim table.

 

Credit memos = CALCULATE((DISTINCTCOUNT(Query1[BillingDocument])); Query1[BillingType] = "G2" )


 

It seems that your measure hits the known issue of Direct query and SAP HANA.

 

SAP HANA issue when query for Counters, and other measures - Incorrect data is returned from SAP HANA if connecting to an Analytical View, and a Counter measure and some other ratio measure, are included in the same visual. This is covered by SAP Note 2128928 (Unexpected results when query a Calculated Column and a Counter). The ratio measure will be incorrect in this case.

 

In addition, you could refer to this similar thread to get the formula how to compare YTD for this year with last year.

 

If you need additional help please share some data sample and expected output. You could upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

 

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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