cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
abc_777
Resolver III
Resolver III

where is my error

Hi

 

is anyone help me out from my error please

 

Sale Total N days =
VAR ndaysselect =
SELECTEDVALUE ('N Days Sale'[MS Forum N Days Sale])
RETURN
SUMX (
FILTER (
BMCalendar,
BMCalendar[Date]
>= TODAY () + ndaysselect
&& BMCalendar[Date] <= TODAY ()
),
[Total Sales Measures]
)
 
 
Sale Total N days backward cumulate =
IF (
NOT ISBLANK ([Sale Total N days]),
CALCULATE (
[Sale Total N days],
FILTER (
ALLSELECTED ( BMCalendar),
BMCalendar[Date] >= MAX ( BMCalendar[Date])
)
)
)
 
1.JPG
 
thx
1 ACCEPTED SOLUTION

Man you r genuus.

 

you r right. Seriouslly your sight is perfect. in slicer I mistakenly change to greate than or equal to and thats because its made this issue.

now i changed to single value and now its perfectly working

 

thanks jihwan really you r genious.

View solution in original post

13 REPLIES 13
abc_777
Resolver III
Resolver III

@Jihwan_Kim,

 

Here is the formula

 

Sale Total N days =
VAR ndaysselect =
SELECTEDVALUE ('N Days Sale'[MS Forum N Days Sale])
RETURN
SUMX (
FILTER (
BMCalendar,
BMCalendar[Date]
>= TODAY () + ndaysselect
&& BMCalendar[Date] <= TODAY ()
),
[Total Sales Measures]
)


Sale Total N days backward cumulate =
IF (
NOT ISBLANK ([Sale Total N days]),
CALCULATE (
[Sale Total N days],
FILTER (
ALLSELECTED ( BMCalendar),
BMCalendar[Date] >= MAX ( BMCalendar[Date])
)
)
)

 

 

1.JPG

Hi, @abc_777 

I am not sure about how your visualization looks like because I cannot see the first column's name, and I cannot know how the first column is related to your date column.

The measure contains the date, but what is the first column in the picture representing?

 

I assume that your first column represents the date of the month. Is it the date of the month and aggregating ALL months and ALL years? Or, is it already filtered by only one month and only one year?

Sorry that I really cannot tell why by only seeing this.

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


1.JPG1.JPG

@Jihwan_Kim 

 

sorry it want my fault i should give column name. here i attached the image. please have a look

How is your [Total Sales Measures] looks like?

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Hi, @abc_777 

I cannot see clearly but I guess your parameter's number is -10 (negative number), right?

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


I know if I can upload the file that would be easy and effecient way to solve the issue but file is company data and file size is 54 mb. at this stage I am sorry as well. i hope you understand

yes. what ever number i give in -10 or -12 its not showing any value i check the formula servral time and compaire with your but couldd't found any error. even for quantity its working greate as i told you yesterday but same formula for sales its not working

Also, try to check if your calendar table is connected to your fact table.

Also, try to check if your calendar table is marked as a date table.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


How does your [total sales measure] look like?

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page



total sales measure =
SUMX('bm_all_cul bm_sales_dhk_all_cul',
('bm_all_cul bm_sales_dhk_all_cul'[SQty] ----- sold quantity
-
'bm_all_cul bm_sales_dhk_all_cul'[rQty]) -----return quantity
*
'bm_all_cul bm_sales_dhk_all_cul'[RPU])----- unit price

so get actual sale amount

global calendar table is connected i can confirmed you coz in same power bi file i can see quantity
is working with same calendar table but not sales

Hi,

Please show me your slicer.

I think there are two spaces.

One is showing -10, right?

How about the other?

I think.... selectedvalue is not working if your slicer is not selecting only one number.

If you do not want to change the type of the slicer, try to amend the measure using MIN, not selectedvalue.

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Man you r genuus.

 

you r right. Seriouslly your sight is perfect. in slicer I mistakenly change to greate than or equal to and thats because its made this issue.

now i changed to single value and now its perfectly working

 

thanks jihwan really you r genious.

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors