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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.