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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Need help with DAX Formulation for sum using equality operator Date columns

Hi,

I have an input method format as shown below in the image(which is obtained through powerapps)

Humbledore_0-1604424473209.png

 

Where the input date has a 'one to one' relationship with the dim date table

Illustration Purpose: This is how values are stored in the dashboard

Humbledore_1-1604424473230.png

 

     Dim input table     

Humbledore_2-1604424473242.png

 

DAX Formula

Humbledore_3-1604424473251.png

 

By using the above formulation I want to achieve the following output:

Humbledore_4-1604424473257.png

 

But I get this as my output

Humbledore_5-1604424473261.png

 

Am I missing out something in the formulation?

1 ACCEPTED SOLUTION

this code might work

Output=VAR vCurrentDate=max(dimDateTable[Date]) RETURN CALCULATE(SUM(Input[Value]),Input[Date]<=VCurrentDate)

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @AntrikshSharma ,

Thanks for the reply 

But my values dont get stored as different columns but as a single view for each input case

For example: For input- Input value- 300 @ input date: jun 2021

jun 20200
dec 20200
jun 2021300
dec 2021300
jun 2022300
dec 2022300
 

For input- Input value- 100 @ input date: dec 2021

jun 20200
dec 20200
jun 20210
dec 20210
jun 2022100
dec 2022100

So each of it is a single view and then finally i want to add them similar to final input above

this code might work

Output=VAR vCurrentDate=max(dimDateTable[Date]) RETURN CALCULATE(SUM(Input[Value]),Input[Date]<=VCurrentDate)

Anonymous
Not applicable

Thanks mate!

Worked like a charm

AntrikshSharma
Super User
Super User

@Anonymous  Try something like this:

=
SUMX (
    DimInputTable,
    DimInputTable[Column 1] + DimInputTable[Column 2] + DimInputTable[Column 3]
)

Helpful resources

Announcements
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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