cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

Dates between earlist date to latest date, but must account for country

Hi,

 

I would like to get the specific number of days between the first PSSV date and the latest SIV date for each country, as of now I can't get the country filter in so it takes the easliest date across all countries to the latest..

 

Can this be solved?

 

2018-04-26_16-04-15.jpg

1 ACCEPTED SOLUTION

Hi @Kristofferaabo,

 

Is what you are trying to achieve similar with the screenshot below? I used just the same formula. Here's a sample PBIX to check that it works: https://drive.google.com/open?id=10K511DhuNDOm8Xpic7TJBonhAWk_knA5

EARLIEST START LATEST END.png

 

 

Did I answer your question? Mark my post as a solution!
"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
www.linkedin.com/in/danebelarminocpa

View solution in original post

6 REPLIES 6
Microsoft
Microsoft

Hi @Kristofferaabo,

 

Are the two [Country] columns highlighted in red coming from the same table or two separate tables?

 1.PNG

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yulgu-msft
Yes they are coming from the same tables! One is just summarizing by country

Hi @Kristofferaabo,

 

I could not reproduce the problem on my side. Would you please share your .pbix file so that I can test for you?

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Resident Rockstar
Resident Rockstar

Hi @Kristofferaabo,

 

Try this DAX measure format

 

EARLIEST =
CALCULATE (
    MIN ( 'Table'[Date] ),
    ALLEXCEPT ( 'Table', 'Table'[Country Column] )
)

 

LATEST =
CALCULATE (
    MAX ( 'Table'[Date] ),
    ALLEXCEPT ( 'Table', 'Table'[Country Column] )
)
Did I answer your question? Mark my post as a solution!
"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
www.linkedin.com/in/danebelarminocpa

Hi thanks for the reply! I tested this, but it still returns the highest and lowest across all my dates, and not by country..

EARLIEST PSSV =
CALCULATE (
MIN ( 'Site query'[pssv_date].[Date] ),
ALLEXCEPT ( 'Site query', 'Site query'[s.country_name] ))


Hi @Kristofferaabo,

 

Is what you are trying to achieve similar with the screenshot below? I used just the same formula. Here's a sample PBIX to check that it works: https://drive.google.com/open?id=10K511DhuNDOm8Xpic7TJBonhAWk_knA5

EARLIEST START LATEST END.png

 

 

Did I answer your question? Mark my post as a solution!
"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
www.linkedin.com/in/danebelarminocpa

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors