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
jyaul786
Helper II
Helper II

Constant value on date

Dear,

 

i have dates table and i want with date slicer(between) on my page , i want to pass constant value(5000) to the first day of month only as per  date selection from slicer. 

data and slicer: 

 

 

 

Date
01/01/2023
02/01/2023
03/01/2023
04/01/2023
05/01/2023
06/01/2023
07/01/2023
08/01/2023
09/01/2023
10/01/2023
11/01/2023
12/01/2023
13/01/2023
14/01/2023
15/01/2023
16/01/2023
17/01/2023
18/01/2023
19/01/2023
20/01/2023
21/01/2023
22/01/2023
23/01/2023
24/01/2023
25/01/2023
26/01/2023
27/01/2023
28/01/2023
29/01/2023
30/01/2023
31/01/2023
01/02/2023
02/02/2023
03/02/2023
04/02/2023
05/02/2023
06/02/2023
07/02/2023
08/02/2023
09/02/2023
10/02/2023
11/02/2023
12/02/2023
13/02/2023
14/02/2023
15/02/2023
16/02/2023
17/02/2023
18/02/2023
19/02/2023
20/02/2023
21/02/2023
22/02/2023
23/02/2023
24/02/2023
25/02/2023
26/02/2023
27/02/2023
28/02/2023
01/03/2023
02/03/2023
03/03/2023
04/03/2023
05/03/2023
06/03/2023
07/03/2023
08/03/2023
09/03/2023
10/03/2023
11/03/2023
12/03/2023
13/03/2023
14/03/2023
15/03/2023
16/03/2023
17/03/2023
18/03/2023
19/03/2023
20/03/2023
21/03/2023
22/03/2023
23/03/2023
24/03/2023
25/03/2023
26/03/2023
27/03/2023
28/03/2023
29/03/2023
30/03/2023
31/03/2023
01/04/2023
02/04/2023
03/04/2023
04/04/2023
05/04/2023
06/04/2023
07/04/2023
08/04/2023
09/04/2023
10/04/2023
11/04/2023
12/04/2023
13/04/2023
14/04/2023
15/04/2023
16/04/2023
17/04/2023

 

required result:

if i select date range 01/01/2023 to 04/03/2023

constant value  will be only on 01/01/2023 and remain all blank like: 

Datevalue
01/01/20235000
02/01/2023 
03/01/2023 
04/01/2023 

 

and if i select date range 03/01/2023 to 04/03/2023

Datevalue
01/01/2023 
02/01/2023 
03/01/20235000
04/01/2023 
05/01/2023 
06/01/2023 
07/01/2023 

 

and if i select date range 03/02/2023 to 04/03/2023

29/01/2023 
30/01/2023 
31/01/2023 
01/02/2023 
02/02/2023 
03/02/20235000
04/02/2023 
05/02/2023 
06/02/2023 
07/02/2023 

 

means constant value on minimum selected date only

 

how can i achieve this, could you please help ?

1 ACCEPTED SOLUTION

8 REPLIES 8
Ahmedx
Super User
Super User

and if you need to show previous dates then you can do this

Screenshot_2.png

Thanks for your reply but i can't create extra table because i have many tables in my model and related with each other. do u have any another way without create table.Thnks

 pls try

 

Thanks for your reply , its working fine . Could you please help me also, i want to get for month, quarter,yearly(column have already).For example:

jyaul786_1-1698748703358.png

 as summarize:

 

 

 

 

jyaul786_0-1698748661397.png

 

 

Measure  test = var mindate=CALCULATE(MIN('Calendar'[Date]),ALLSELECTED())
return       IF(MAX('Calendar'[Date])=mindate,50000,BLANK())

pls try

 

its being blank when i selected date from 02-Jan-2023 and onwards.FYI:

 

jyaul786_0-1698750320138.png

 

pls try

 

Ahmedx
Super User
Super User

you should use a disabled table

Sample PBIX file attached

Screenshot_1.png

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.