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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.