Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi,
If i wanted to create a filter for a chart and only wanted to include the Max Versions per Month end, how can i do this - example data as follows
| Snap Key | Snap Date | Month End | Version |
| 1 | 2021-02-02 | 2021-01-31 | 1 |
| 2 | 2021-02-06 | 2021-01-31 | 2 |
| 3 | 2021-03-02 | 2021-02-28 | 1 |
| 4 | 2021-04-02 | 2021-03-30 | 1 |
| 5 | 2021-04-04 | 2021-03-30 | 2 |
| 6 | 2021-04-04 | 2021-03-30 | 3 |
When i apply the filter i should only see the following:
| Snap Key | Snap Date | Month End | Version |
| 2 | 2021-02-06 | 2021-01-31 | 2 |
| 3 | 2021-03-02 | 2021-02-28 | 1 |
| 6 | 2021-04-04 | 2021-03-30 | 3 |
Any help would be appreciated.
Solved! Go to Solution.
Hi @Mal_Sondh
You can create a measure and then put the measure in the filter .
max version =
var max_version=CALCULATE(MAX('Table'[Version]),ALLEXCEPT('Table','Table'[Month End]))
return IF(SELECTEDVALUE('Table'[Version])=max_version,1,0)
Then put the measure in the filter ,set the value is equal to 1 ,
The effect is as shown :
I have attached my pbix file ,you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Mal_Sondh
You can create a measure and then put the measure in the filter .
max version =
var max_version=CALCULATE(MAX('Table'[Version]),ALLEXCEPT('Table','Table'[Month End]))
return IF(SELECTEDVALUE('Table'[Version])=max_version,1,0)
Then put the measure in the filter ,set the value is equal to 1 ,
The effect is as shown :
I have attached my pbix file ,you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Mal_Sondh , Create measure like these for snap key and version and use with Month, take max of date if needed
Version =
VAR __id = MAX ('Table'[Month ] )
VAR __date = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[Month ] = __id )
CALCULATE ( max ('Table'[End Version] ), VALUES ('Table'[Month] ),'Table'[Month] = __id,'Table'[Date] = __date )
Snap =
VAR __id = MAX ('Table'[Month ] )
VAR __date = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[Month ] = __id )
CALCULATE ( max ('Table'[Snap Key] ), VALUES ('Table'[Month] ),'Table'[Month] = __id,'Table'[Date] = __date )
so the name of the table is Snapshot - are you referencing any other tables above in your query?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |