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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
TDE_Dragan
Regular Visitor

Problem with aggegate values

Hi all,

I am new to DAX, comming with SQL Server background.
My data is organized in a classic way, two tables:
- Companies, with columns company_id, country and name;

- Impressions, with impression_id, click_id, company_id and timestamp.
The problem I have is with some aggregated values, I can create them as calculated columns on Companies table or as whole new table - however this way allows only filtering on Companies[Country] and I absolutely need to filter on Impressions[timestamp].

Can you please suggest how to modify my DAX?

ADDCOLUMNS (
    SUMMARIZE (
        Impressions;
        Impressions[target_company_id];
        "TotalImpressions"; SUMX ( Impressions; IF ( Impressions[impression_id] > 0; 1 ) );
        "TotalClicks"; SUMX ( Impressions; IF ( Impressions[click_id] > 0; 1 ) )
    );
    "Company Name"; LOOKUPVALUE (
        Companies[Company Name];
        Companies[id]; Impressions[target_company_id]
    )
)


Thanks!

0 REPLIES 0

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.