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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
NavaneethaRaju
Helper IV
Helper IV

Need Measure- SUM by TAG ID and respective sum along with

Hi, 

I'm in middle of that one, i need to show the data and filter respective of slicer.

I wrote measure for sum of procedures respective of tag id, that worked on entire years of data.

 

whenever i select the date range, between that range it wont give sum value respective of tag id. 

 

I need measure to sum the procedures respective of tag id, as well as with between dates slicer.

Total Procedures(TagLocation) =
SUMX(VALUES('Tag Usage Fact'[Tag ID]),CALCULATE(SUM('Procedure Fact'[Procedures]),ALLEXCEPT('Tag Usage Fact','Tag Usage Fact'[Tag ID]),ALLEXCEPT('Sales Fact','Sales Fact'[Account ID])))

Figure 1: All year data for one tag id and its sum and percentage

NavaneethaRaju_0-1657004090785.png

 

When i applied the last 3 months relative date filter on slicer, it should show below like this

NavaneethaRaju_1-1657004397589.png

Figure 2:

NavaneethaRaju_2-1657004449819.png

 

Using that measures, this is not working respective of date filters. its display total for all time.
Actually its showing like this, I actually i want like Figure 2.

NavaneethaRaju_3-1657004729829.png

 

 

I enclosed the sample data and measures will indicate which are the fields and I'm using from which table

Tag IDSystem NameSet IDSet NameOrder DateAccount Tag Owner No of ProceduresTotal Procedures% of Usage
4AZ1001AZ SET28-10-2020 00:00Hospital 1Alex1186%
4AZ1001AZ SET01-12-2020 00:00Hospital 1Alex1186%
4AZ1001AZ SET15-12-2020 00:00Hospital 1Alex1186%
4AZ1001AZ SET31-12-2020 00:00Hospital 1Alex1186%
4AZ1001AZ SET21-01-2021 00:00Hospital 1Alex1186%
4AZ1001AZ SET02-02-2021 00:00Hospital 1Alex1186%
4AZ1001AZ SET06-04-2021 00:00Hospital 1Alex1186%
4AZ1001AZ SET20-04-2021 00:00Hospital 1Alex1186%
4AZ1001AZ SET11-05-2021 00:00Hospital 1Alex1186%
4AZ1001AZ SET27-05-2021 00:00Hospital 1Alex1186%
4AZ1001AZ SET04-11-2021 00:00Hospital 1Alex1186%
4AZ1001AZ SET30-11-2021 00:00Hospital 1Alex1186%
4AZ1001AZ SET15-03-2022 00:00Hospital2Alex41822%
4AZ1001AZ SET12-04-2022 00:00Hospital 3Alex1186%
4AZ1001AZ SET14-04-2022 00:00Hospital 3Alex1186%
1 REPLY 1
v-cazheng-msft
Community Support
Community Support

Hi @NavaneethaRaju ,

 

You may try this Measure.

 

ActualTotal =
CALCULATE (
    [Total Procedures(TagLocation)],
    FILTER (
        'Tag Usage Fact',
        'Tag Usage Fact'[Order Date] >= MIN ( 'Tag Usage Fact'[Order Date] )
            && 'Tag Usage Fact'[Order Date] <= MAX ( 'Tag Usage Fact'[Order Date] )
    )
)

 

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please provide some sample data of your tables and the relationships between these tables. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors