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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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