cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anna123456
Frequent Visitor

Get column based on date and title

Hello, 

I have a question. I want to get the value of "visit24hrs" for today for each title in my report. I try to use this formula: 

 
result = CALCULATE(SUM(AnalyticsView[Visits24h]), FILTER(ALL( AnalyticsView), (today() = AnalyticsView[Date]))) 

In my chart I use for Y Title and for X result.
But now I get the same number (the summed result) for each Title. 
Question: How can I display the result for each item in my chart? Without the "sum" in the formula I am not able to use Visits24hrs in the measure (it says it can not regognize the column)
 
Best wishes, 
Anna
1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Anna123456 

are you expecting something like:

result = 
MAXX(
    FILTER(
        ALL(AnalyticsView), 
        AnalyticsView[Date] = TODAY()
    ),
    AnalyticsView[Visits24h]
)

View solution in original post

4 REPLIES 4
andhiii079845
Super User
Super User

You use this as a calculated column, right?

result = CALCULATE(SUM(AnalyticsView[Visits24h]), FILTER(ALL( AnalyticsView), (today() = AnalyticsView[Date]))) 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




FreemanZ
Super User
Super User

hi @Anna123456 

are you expecting something like:

result = 
MAXX(
    FILTER(
        ALL(AnalyticsView), 
        AnalyticsView[Date] = TODAY()
    ),
    AnalyticsView[Visits24h]
)

I added another filter (for the distinct items) and now it works with your code. thank you!! 

Hello, 

 

Now I get the max value of my visits24hr over all items ... so in my chart it is displaying the same number for every item (which is not correct....)
But thank you for your try to help me 🙂 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

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

Top Solution Authors
Top Kudoed Authors