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
abc_777
Post Prodigy
Post Prodigy

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
Post Prodigy
Post Prodigy

@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
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.