PowerPivot - Granularity issues with a many-to-many relationship

Gabe B

New Member
Joined
Sep 21, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have two fact tables, one that is a list of stays at multiple hotels with 4 columns (Location, arrival date, departure date, member ID), another that's a series of transactions with a bunch of details (location, transaction date, member id, item sold, item category, etc). Both tables have the same location, member id, and dates used multiple times, the transaction table has the same item and item category multiple times. I have the appropriate dimension tables for members, locations, items and categories, and a calendar table.

My objective is to evaluate the amount of sales per night stayed at each hotel. I have written the following calculated column using DAX:

Code:
=
CALCULATE (
    SUM ( FactClubChits[Net Amount] ),
    DATESBETWEEN (
        'FactClubChits'[Date of Record],
        'StayWindows'[arrDateDataTextBox],
        'StayWindows'[depDateDataTextBox]),
    FILTER (
        'DimMembers',
        'DimMembers'[ClubMemberCode] = 'StayWindows'[MemberCode]
    ),
    FILTER (
        'DimCompanies',
        'DimCompanies'[CompanyName] = 'StayWindows'[HotelName]
    )
)

This gives accurate results by location, and Member ID but when I create a pivot table for item category I get repeating values for all rows. Is there a way I can alter my dax to promote the granularity that's desired? Thanks in advance for any help and advice someone can provide.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,215,026
Messages
6,122,738
Members
449,094
Latest member
dsharae57

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top