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
tangutoori
Helper III
Helper III

Capture Category as per selected date dynamically

Dear Team,

 

Belwo is my source data. we have two slicers, Date1 SLicer adn Date 2 Slicer.

When i select Date 1 Slicer then Category of that particular ID and RO Value should be captured.

When i select Date 2 Slicer then Category of that particular ID and RO Value should be captured.

Delta should be processded R&O value at Date2 - R&O value at Date1

 

INPUT

DATEIDCategoryR&O Value
1-Nov-23RO12BLUE100
1-Nov-23RO13CLOSED0
1-Nov-23RO14BLUE200
1-Nov-23RO15IMPLEMENTED0
2-Nov-23RO12BLUE200
2-Nov-23RO13BLUE100
2-Nov-23RO14BLUE200
2-Nov-23RO15BLUE300
3-Nov-23RO12CLOSED0
3-Nov-23RO13BLUE0
3-Nov-23RO14IMPLEMENTED300
3-Nov-23RO15BLUE400
3-Nov-23RO16BLUE350

 

 

SLICER

Date1 -SLICERDate2-SLICER
1-Nov-233-Nov-23

 

OUTPUT

IDCategory at Date1Category at Date2R&O value at Date1R&O value at Date2Delta
RO12BLUECLOSED1000-100
RO13CLOSEDBLUE000
RO14BLUEIMPLEMENTED200300100
RO15IMPLEMENTEDBLUE0400400
RO16 BLUE0350350

 

Regards

Reddy.

 

 

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

Sorry I don't have a version of Desktop that is that old. But my data model is pretty simple

 

d_gosbell_0-1699586180183.png

 

I made the relationship to Calendar2 inactive.

 

Then the technique I used with the "Date2" measures was the following pattern

 

Category at Date2 = CALCULATE(
    max( 'DataTable'[Category]),
    USERELATIONSHIP('DataTable'[DATE], Calendar2[Date])
    ,all('Calendar')
)
 
R&O Value at Date2 = CALCULATE(
    sum( 'DataTable'[R&O Value]),
    USERELATIONSHIP('DataTable'[DATE], Calendar2[Date]),
    ALL('Calendar')
)

View solution in original post

5 REPLIES 5
d_gosbell
Super User
Super User

Sorry I don't have a version of Desktop that is that old. But my data model is pretty simple

 

d_gosbell_0-1699586180183.png

 

I made the relationship to Calendar2 inactive.

 

Then the technique I used with the "Date2" measures was the following pattern

 

Category at Date2 = CALCULATE(
    max( 'DataTable'[Category]),
    USERELATIONSHIP('DataTable'[DATE], Calendar2[Date])
    ,all('Calendar')
)
 
R&O Value at Date2 = CALCULATE(
    sum( 'DataTable'[R&O Value]),
    USERELATIONSHIP('DataTable'[DATE], Calendar2[Date]),
    ALL('Calendar')
)

all working fine, but when i remove ID all values are showign 0. can we show those values with out ID column ?

d_gosbell
Super User
Super User

So you would need to create a date table for each slicer, the attached pbix file achieves the following

d_gosbell_0-1699571350360.png

 

 

Dear Gosbell,

 

thankyou somuch for your support.

Am facing the below error. which version you have used to developed this soolution. as now am using Report Server vesion Jan2023

tangutoori_0-1699578437994.png

Please let me know how can i opne the file.

 

Regards,

Reddy.

 

tangutoori
Helper III
Helper III

No solution for m requirmetn ?

 

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.