Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I am trying to create two columns as checking company names (in the below example, it's in A column) and I need to fetch the first date (in B column) and the last date (in B column) for the same company names.
I shared a sample data below and the two colored columns should be the results.
I need dax formula for it and any help or directions appreciated
Thanks...
Solved! Go to Solution.
You can use a column or measure expression like this
FirstDate = CALCULATE(MIN(Table[Date]), ALLEXCEPT(Table, Table[Company Name]))
LastDate = CALCULATE(MAX(Table[Date]), ALLEXCEPT(Table, Table[Company Name]))
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
hello
I just have the same problem but I put the formula and it tells me that it is wrong.
"You can't determine a single value for the 'FECHA_VIS_COMPLETA' column in the '3 EV_total views' table. This can happen when a measurement formula references a column that contains many values without specifying an aggregation, such as min, max, count, or sum, for or "
Can you help me?
I have a table with hash_id (as if it were the name of the company) and in my case date of viewing videos, several per customer (as if they were purchase dates), and I need to know the first date by hash_id.
Thank you very much for your contribution
Hi,
Thanks for the reply. That was I was looking for.
Have a nice day
You can use a column or measure expression like this
FirstDate = CALCULATE(MIN(Table[Date]), ALLEXCEPT(Table, Table[Company Name]))
LastDate = CALCULATE(MAX(Table[Date]), ALLEXCEPT(Table, Table[Company Name]))
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
72 | |
39 | |
31 | |
26 |
User | Count |
---|---|
97 | |
87 | |
43 | |
40 | |
35 |