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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Summarize table with another column of another table

Hello,

I have this Dax formula :

Irache_2-1680680911648.png

 

This DAX formula make a group by column with two columne of my date table named "Date_IN_OUT" especially with "Semaine entreprise" column which is  the Compagny Week which take value like "2023-01"  and the two metric choose for this group by are a two sum based on different filter of my fact table "Data".

Now I want to group by on another column but this column isn't in my Date table but with my fact table and I don't how I can make that. 
Note that my fact table and date table are link with ther column :

Irache_3-1680681368048.png


and this summarize table which I made are link with my fact table like this :

Irache_4-1680681484051.png

I hope someone can help me please.

13 REPLIES 13
tamerj1
Super User
Super User

@Anonymous 
You can summarize 'Data' instead of 'Date_In_Out'. That would give you access to the columns of both tables.

Anonymous
Not applicable

Thanks for your response, it's work but partially the value for the result isn't good :

Irache_0-1680698097314.png

Irache_1-1680698194006.png

The number of IN are the same for each shop it's obviously a problem in my measure for calculate the number of IN and OUT but I cannot find it.

@Anonymous 

If you delete FILTER ( ALLSELECTED ( DATA ) ) part what do tou get?

Anonymous
Not applicable

It's give me well number for the IN column but for the OUT column it's not good

Irache_0-1680700301692.png

 

@Anonymous 

For OUT add CROSSFILTER ( 'Table'[IN Date], 'Date'[Date], NONE )

Anonymous
Not applicable

Where I add this functon in OUT column ?

Irache_0-1680705337151.png

 

@Anonymous 

No. 
place it before FILTER as a seperate argument of CALCULATE 

Anonymous
Not applicable

It doesn't work 

Irache_0-1680709104135.png

Irache_1-1680709148434.png

 

 

@Anonymous 
Please try

Entrée/Sortie =
VAR lastDataWeek =
    MAX ( Data[#Semaine de mesure] )
RETURN
    SUMMARIZE (
        'Data',
        'Date_IN_OUT'[Semaine Entreprise],
        'Date_IN_OUT'[Mois Entreprise],
        'Data'[#Nom complet magasin],
        "Entrée",
            SUMX (
                FILTER (
                    Data,
                    Data[#Semaine entrée] = 'Date_IN_OUT'[Semaine Entreprise]
                        && Data[#Semaine de mesure] = lastDataWeek
                ),
                Data[#Nombre entrée]
            ),
        "Sortie",
            SUMX (
                FILTER (
                    Data,
                    Data[#Semaine sortie] = 'Date_IN_OUT'[Semaine Entreprise]
                        && Data[#Semaine de mesure] = lastDataWeek
                ),
                Data[#Nombre sortie]
            )
    )
Anonymous
Not applicable

It's not the well result.

Irache_0-1680763835024.png

May be we must place a REMOVEFILTER or KEEPFILTER function ?

Anonymous
Not applicable

Hello,
Do you have a solution please ?

Greg_Deckler
Community Champion
Community Champion

@Anonymous Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Sorry for this forget, so currently I have this table after the DAX function :

Compagny

Week

Count

IN

Count

OUT

Year

In

progress

Compagny

Month

Month

Number

2008-05517-420085172008-M011
2008-062-15320081512008-M022

 

And I want to have this table:

Compagny

week

Count

IN

Count

OUT

Year

In

Progress

Compagny

month

Month

number

Shop
2008-05500-220084982008-M011Mag1
2008-061-1002008-992008-M011Mag1
2008-0517-22008-152008-M011Mag2
2008-061-532008-522008-M011Mag2


The problem is the Shop column is in my fact table "Data" and my summarize function is based on my date table.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.