Need DAX formula for the below situation in Power BI

Gautham A

Board Regular
Joined
May 25, 2020
Messages
107
Office Version
  1. 2016
Platform
  1. Windows
Hi Team,

I have no idea of how to write a DAX for the below situation. At least a hint would give me the right direction.

In the image, the 1st table refers to the data table. It has 2 date columns and 2 text columns

In the output, for each row I want it to count the number of records that are present before Open Date column and Close Date can be blank or after the value in current cell of Open Date.

An Example would make it clear

Example 1:
In First row of output(Highlighted in yellow), For 1st march counts is 0 because in data table there is no rows on or before 1st march.

Example 2:
In Third row of output(Highlighted in Orange), For 3rd march counts is 2 because in data table there is 2 rows on or before 3rd march and close date is after 3rd march

Example 3:
In Sixth row of output(Highlighted in Blue), For 6th march counts is 6 because in data table there is 6 rows on or before 6th march and close date is after 6th March
 

Attachments

  • DAX_Doubt.PNG
    DAX_Doubt.PNG
    86.8 KB · Views: 7

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,215,151
Messages
6,123,316
Members
449,094
Latest member
Chestertim

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