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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
giorgiokatr
Helper V
Helper V

Select values from different columns depending on the dates selected

my table is like that

date (close of month)SalesUnique CustomersUnique Customers 3MUnique Customers 6MUnique Customers 12M
29/1/201631479257594786
29/2/2016460115257594786
31/3/201638095257594786
28/4/201636090476594786
31/5/2016896224476594786
30/6/20161056266476594786
29/7/201631679283480786
31/8/2016408102283480786
30/9/2016572143283480786
31/10/2016412103290480786
30/11/2016708177290480786
14/12/201662182904800

 

I would like when i select one month to have the values of Unique Customers.

When a user selects a quarter (Q1, Q2, Q3, Q4) ( to have the values of 3M, when selects YTD to have the values of 12M

If users selects months that are not in a quarter (Q1, Q2, Q3, Q4) (eg 29/2 - 31/3 - 28/4) maybe a blank value?

 

for one month selection is quite simple

 

IF(DISTINCTCOUNT('mytable'[date])=1;SUMX('mytable';'mytable'[Contacts unique clients]);"")

Any ideas?

 

 

1 ACCEPTED SOLUTION
2 REPLIES 2

Thanks! Very helpful!

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.