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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ML222
Frequent Visitor

Create Opening Measure - 2 Columns of Dates to equal inactive Date table Value from Slicer

Hi,

Here I have:

ML222_0-1697202957809.png

- Fact Table with 2 Date columns ( DIM_DAY_KEY & VALUE_DIM_DAY_KEY)
- A Date Table with an active relationship to the Fact table

- A Comparison Date table with an Inactive relationship to the Fact Table

My Canvas looks like this:

ML222_1-1697203162410.png

Comparison Date = Compairson Date Table with Inactive Relationship
Report Date = Date Table with Active Relationship


The calulation I require is to work out the Opening Coverage.
I need to use a Divide Function.

For the numerator I need the Sum of Value Where:
DIM_DAY_KEY = The Value of Comparision Date
&& VALUE_DIM_DAY_KEY = The Value of Comparision Date

For the denominator I need the Opening Value which is quite simply:

ML222_3-1697203617749.png

 

ML222_2-1697203385798.png

 

I have tried a number of different DAX formulas but they either return blank, or timeout. The actual table is very large.
Here's a couple I've tried:

ML222_4-1697203690743.png

 

 

ML222_5-1697203893010.png

 

Any Idea's on where I am going wrong in my DAX?

Thank you

 

1 ACCEPTED SOLUTION

Hi @amitchandak,

Thank you. That video helped although I did not acheive the result with your method.
In my instance; I need to apply the 'FromDate' to where both the Primrary date and the Secondary Date (from my Fact table) equal the selected 'From Date' Value. When trying to solve with just one calculate, the DAX would return blanks.

I was able to get it to work using the following DAX:

ML222_0-1697460651704.png

 

This works. Performance seems good.
If you see a way to get this solved in one calculate, that would be ideal. However, I have managed to figure that one out yet.


View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@ML222 , Refer the approach I used

 

Power BI Abstract Thesis: How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

 

Select data between months - https://youtu.be/nEt7dT3Tfv4

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi @amitchandak,

Thank you. That video helped although I did not acheive the result with your method.
In my instance; I need to apply the 'FromDate' to where both the Primrary date and the Secondary Date (from my Fact table) equal the selected 'From Date' Value. When trying to solve with just one calculate, the DAX would return blanks.

I was able to get it to work using the following DAX:

ML222_0-1697460651704.png

 

This works. Performance seems good.
If you see a way to get this solved in one calculate, that would be ideal. However, I have managed to figure that one out yet.


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.